Comparing data to extended property

  • 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 '>'.

  • I would think that you should have () around each complete select statement. 

  • THANKS

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

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