vendredi 8 mai 2015

sql server if statement not working

Can anyone advise me as to what is wrong with the following SQL server update statement:

IF (SELECT * FROM TBL_SystemParameter WHERE code='SOUND_WRONG_GARMENT') = ''
GO
UPDATE TBL_SystemParameter 
SET [Value] = 'Ping.wav' 
WHERE ID = (SELECT ID 
            FROM TBL_SystemParameter 
            WHERE code = 'SOUND_WRONG_GARMENT')

Aucun commentaire:

Enregistrer un commentaire