How come when I issue this statement

select * from persondemographic(nolock)
where demographicgroupid =3
and demographicitemid = 4
and cast(demographicvaluedesc as datetime) > getdate()-1

I get a result set, but all the fields and when I issue this statement

select personid from persondemographic(nolock)
where demographicgroupid =3
and demographicitemid = 4
and cast(demographicvaluedesc as datetime) > getdate()-1

I get this error
Server: Msg 241, Level 16, State 1, Line 1
Syntax error converting datetime from character string.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to