Parsing Problem

  • 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!

    .

  • If you pass a DATE type parameter, it should work.

    For example, create a DateTime variable, and map it with DATE data type.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply