hi guys
im using classic asp and sql server 05 - and my web form submits an update statement which in result updates a sql table.
my question is, is there a way to force an update statement to only update by making use of the IF NOT IS NULL function?
my update statement
I need to somehow do a check on the Price_Band_1, Price_Band_2, Price_Band_3, Price_Band_4, Price_Band_5 fields of the web form to ONLY perform the SQL update if data is present in the form and submitted. otherwise ignore these empty form fields...
please advise and thanks in advance
im using classic asp and sql server 05 - and my web form submits an update statement which in result updates a sql table.
my question is, is there a way to force an update statement to only update by making use of the IF NOT IS NULL function?
my update statement
Code:
sSQL="UPDATE UK_SpecialsTEST SET " & _ "Price_Band_1=" & Price_Band_1 & ", Month_Band_1='" & Month_Band_1 & "', Date_Band_1='" & Date_Band_1 & "'," & _ "Price_Band_2=" & Price_Band_2 & ", Month_Band_2='" & Month_Band_2 & "', Date_Band_2='" & Date_Band_2 & "'," & _ "Price_Band_3=" & Price_Band_3 & ", Month_Band_3='" & Month_Band_3 & "', Date_Band_3='" & Date_Band_3 & "'," & _ "Price_Band_4=" & Price_Band_4 & ", Month_Band_4='" & Month_Band_4 & "', Date_Band_4='" & Date_Band_4 & "'," & _ "Price_Band_5=" & Price_Band_5 & ", Month_Band_5='" & Month_Band_5 & "', Date_Band_5='" & Date_Band_5 & "' WHERE ID='" & ID & "' "
please advise and thanks in advance
Comment