Cannot use empty object or column names. Use a single space if necessary.
So, what's the correct way of doing the following?
IF @.filename <> ""
BEGIN
UPDATE Experimental_Images SET contentType = @.contentType, filename = @.filename WHERE (id = @.iconNo)
ENDThe problem you are having is that you are using double quotes when youshould be using single quites. The rest of your statements are fine.
What do you mean exactly by "if the parameter is empty". If youmean if it contains an empty string or a NULL, try it like this:
IF ISNULL(@.filename,'') <> ''
If you mean it contains a NULL, try this:
IF @.filename IS NOT NULL
And if you mean it contains an empty string, try it like this:
IF @.filename <> ''
No comments:
Post a Comment