M
Marc T
Hi,
I'm having a bit of an infuriating problem which I'm hoping someone will be
able to help with....
I'm using Microsoft Query to dump data from an Oracle db into an Excel
spreadsheet, and need to pass a date from a cell so that the data returned is
from 'less than or equal' to this date. It works fine when I hard-code the
date into the query, but if I have it as a user entered parameter it always
shows up an error.
Any idea what I need to do? Is there a way to force the # # symbols around
the parameter so the format is converted?
Any help would be hugely appreciated!
Here's the query with the date hard-coded in:
SELECT v.VOUCHER_TYPE, v.VOUCHER_NO, v.VOUCHER_DATE, v.ACCOUNT,
v.ACCOUNT_DESC, v.CODE_B, v.AMOUNT, v.TEXT
FROM IFSAPP.PROJECT_ACTIVITY a, IFSAPP.GEN_LED_VOUCHER_ROW_UNION_QRY v
WHERE v.PROJECT_ACTIVITY_ID = a.ACTIVITY_SEQ AND v.CODE_C = a.PROJECT_ID AND
((v.CODE_C=?) AND (a.SUB_PROJECT_ID Like 'UC') AND (a.ACTIVITY_NO Like '00')
AND (v.VOUCHER_DATE<={ts '2007-10-26 00:00:00'}))
Marc
I'm having a bit of an infuriating problem which I'm hoping someone will be
able to help with....
I'm using Microsoft Query to dump data from an Oracle db into an Excel
spreadsheet, and need to pass a date from a cell so that the data returned is
from 'less than or equal' to this date. It works fine when I hard-code the
date into the query, but if I have it as a user entered parameter it always
shows up an error.
Any idea what I need to do? Is there a way to force the # # symbols around
the parameter so the format is converted?
Any help would be hugely appreciated!
Here's the query with the date hard-coded in:
SELECT v.VOUCHER_TYPE, v.VOUCHER_NO, v.VOUCHER_DATE, v.ACCOUNT,
v.ACCOUNT_DESC, v.CODE_B, v.AMOUNT, v.TEXT
FROM IFSAPP.PROJECT_ACTIVITY a, IFSAPP.GEN_LED_VOUCHER_ROW_UNION_QRY v
WHERE v.PROJECT_ACTIVITY_ID = a.ACTIVITY_SEQ AND v.CODE_C = a.PROJECT_ID AND
((v.CODE_C=?) AND (a.SUB_PROJECT_ID Like 'UC') AND (a.ACTIVITY_NO Like '00')
AND (v.VOUCHER_DATE<={ts '2007-10-26 00:00:00'}))
Marc