Cullenward
Programmer
Is there a way to build an update statement piece by piece?
For example, depending on which variables have values I would like to add them to the WHERE clause and then execute the update statement.
so when variable var1 is greater than 100 it would add
AND var1 > 100
to the where statement, but if it was less than 100 it wouldn't. I'm trying to avoid having 10-20 IF statements to account for the different situations.
For example, depending on which variables have values I would like to add them to the WHERE clause and then execute the update statement.
so when variable var1 is greater than 100 it would add
AND var1 > 100
to the where statement, but if it was less than 100 it wouldn't. I'm trying to avoid having 10-20 IF statements to account for the different situations.