Page 1 of 1

passing date as parameter through sequence

Posted: Wed Jun 06, 2007 10:41 am
by mystuff
I found few topics similar to this, but this one is somewhat different.

I have a sequence_TOP calling another sequence_LOW calling an extract job.

I send a value '2007-01-01' through sequence_TOP to sequence_LOW and which in turn passes it to the extract job. The parameter type is declared as 'DATE' in both sequence_LOW and extract job.

But when I use this value in SQL query (on oracle) in extract job. It gives error

Code: Select all

ORA-00932: inconsistent datatypes: expected DATE got NUMBER
I even tried passing time - '2007-01-01 00:00:00'

If I use single quotes in the query to encapsulated the parameter, it works fine.

If it doesn't work this way, what is the use of parameter of type Date (not being sarcastic :oops: )

Posted: Wed Jun 06, 2007 11:17 am
by ds_developer
I don't use Sequences much, but I would pass everything as a string then use the Oracle TO_DATE function in your query.

John

Posted: Wed Jun 06, 2007 11:31 am
by DSguru2B
Can you post your sql query.

Posted: Wed Jun 06, 2007 11:32 am
by mystuff
So the date function is it to just check if the passed value is date format and not to use within oracle plugin?

Posted: Wed Jun 06, 2007 11:35 am
by mystuff
SQL Query

Code: Select all

select * from tablename where column_of_type_date>#ReadDate#

Posted: Wed Jun 06, 2007 11:40 am
by DSguru2B
In this case you do need quotes around your date.