This SQL query is throwing up an error. It is pretty obvious what I am trying to achieve. Any ideas? I'm quite new to conditional SQL queries.
SQL Code:
IF EXISTS (SELECT * FROM bank_data WHERE ContactID = '95' AND BankID = 'Test_Bank') UPDATE bank_data SET Response = 'Green,Funny,Element,False,09/07/2011,13:00,Yellow,Fish-Monkey-Chimpers,Blue,' WHERE ContactID = '95' AND BankID = 'Test_Bank' ELSE INSERT INTO bank_data (ContactID, BankID, Response) VALUES ('95','Test_Bank','Green,Funny,Element,False,09/07/2011,13:00,Yellow,Fish-Monkey-Chimpers,Blue,')




Reply With Quote