I am trying to compare a date from a table to a value in an extended property using the following condition but I am getting the incorrect syntax error. Could someone please tell me what am I doing wrong?
TIA
Dean
IF
SELECT MAX(Job_Booked_Date) AS MaxBookedDate FROM parfls.dbo.JobMaster >
SELECT value FROM ::fn_listextendedproperty ('DataUpdated', 'schema', 'dbo', 'table', 'GPSReport', null, default)
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '>'.