0

we recently migrated to ssrs 2017 from an older version and on certain reports, where we utilize ISDATE the report returns an argument and does not run, here is the case statement in the query

CASE WHEN ISDATE(or_shby) = 1 THEN CONVERT(DATE,or_shby) ELSE NULL END AS or_shby,

here is the argument error

Msg 8116, Level 16, State 1, Line 5 Argument data type date is invalid for argument 1 of isdate function.

Any help would be appreciated

Thank you

lmags
  • 11
  • 2
  • If the column is a date, you don't need any conversion at all. – Gordon Linoff Aug 28 '20 at 00:18
  • @GordonLinoff - i found the issue, the report that was being utilized was using an openquery to get data, since the odbc driver being utilized to get data from our ERP is not fully compatible with server 2019 datacenter using ssrs 2017, we had to adapt the table in to staging in which allowed the case statement to function the correct way. – lmags Aug 31 '20 at 16:37
  • Thank you though, for your insight, I appreciate it. – lmags Aug 31 '20 at 16:39

1 Answers1

1

Based on the error message, this should suffice:

or_shby

There is no need for logic to convert a date to a date.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786