I have this condition in my where clause
CAST((SELECT SettingData FROM PropertySettings WHERE SettingName = 'BusinessDate') AS datetime) > '20091221'
It parses fine and work as expected in SSMS. It also parses fine in SSIS OLEDB Data Source editor. BUT when I try to replace the hard coded date with an parameter marker (?) it fails the parser. So, this does NOT parse:
CAST((SELECT SettingData FROM PropertySettings WHERE SettingName = 'BusinessDate') AS datetime) > ?
I don't get it. Anybody have any ideas?
Thanks And Merry Christmas!