Page 1 of 1

Date as a parameter

Posted: Wed Jun 14, 2006 1:26 pm
by vsi
Hi,

Can we use date as a parameter to the SQL queries which we embed in Database Stages to extract data??

Thank You

Posted: Wed Jun 14, 2006 1:28 pm
by kris007
Yes, you can. :)

Posted: Wed Jun 14, 2006 10:01 pm
by nick.bond
Yes - just remember that the parameter is inserted into the SQL statement exactly as it is written and no quotes are put in there for you, so if the parameter contains a string value you will need single quotes around it.

e.g.

select * from my_table where my_varchar_col = '#pMY_PARM#'

Posted: Thu Jun 15, 2006 6:57 am
by DSguru2B
Also keep in mind that you should send a date part and a time part seperately, or timestamp with only integers in it. Because unix doesn like space in the param file and in a timestamp you will have a space between a date and time part.