Home Forums SQL Server 7,2000 T-SQL Incorrect syntax near the keyword 'IF'. RE: Incorrect syntax near the keyword 'IF'.

  • Lookup the syntax for INSERT INTO..SELECT. You cannot put any external qualifications between the INSERT and the SELECT. If you want to filter it you should do that through either the WHERE clause or the ON clause (if it has JOINs).

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]