Results 1 to 2 of 2

Thread: Help Please

  1. #1
    Join Date
    Feb 2004
    Posts
    26

    Red face Unanswered: Help Please

    i have this error !!!


    Error Diagnostic Information
    ODBC Error Code = 37000 (Syntax error or access violation)


    [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'IF'.


    SQL = "UPDATE tempRetrait SET email = "nicolas@publisoft.com" WHERE IF @@ROWCOUNT = 0 INSERT tbl(email,dateEntree) VALUES ("nicolas@publisoft.com","{ts '2004-02-19 17:07:35'}")"

  2. #2
    Join Date
    Aug 2003
    Location
    Kingston, Ontario
    Posts
    106
    If Not Exists(Select email From tbl Where email='me@abc.com')
    INSERT tbl (email,dateEntree) VALUES ('me@abc.com', '2004-02-19 17:07:35')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •