Please tell me where my syntax is wrong:
declare @dte1 as datetime
Set @dte1 = (Select Case When $[$OINV.U_ORD_TYP] = 'S' Then 40450 Else cast($[$12.0.date] as int) End)
Select @dte1
If I use $[$4.0.0] to compare for a BP it works, but trying to compare using a UDF I get the very useful, Internal Error message.
Thanks.