I have a sql statement like this:
DECLARE @MyVariable as varchar(50)
SET @MyVariable = $(TokenValue)
In this the $(TokenValue)
will fill in a value from a form (ignore how it's doing it, it's not important, just that if there's a value in the field it relates to it'll get filled in there). If The field in the form was left blank however, there will be nothing put there, leaving the end result like this:
DECLARE @MyVariable as varchar(50)
SET @MyVariable =
rather than
DECLARE @MyVariable as varchar(50)
SET @MyVariable = 'FormInputValue'
Since there's nothing after the =, how can I account for this and make sure the SQL statement doesn't crash? The token never writes null to it's place, always just a blank if the field was left empty... Any ideas?
Thanks,
Matt