Hi,
Can we use date as a parameter to the SQL queries which we embed in Database Stages to extract data??
Thank You
Date as a parameter
Moderators: chulett, rschirm, roy
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#'
e.g.
select * from my_table where my_varchar_col = '#pMY_PARM#'
Regards,
Nick.
Nick.
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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.