I have a select statement that stores the result in a variable,this works fine if there is only one condition and field in the clause.How do I go about it if there is more than one?
For example (Working one)
SELECT @Variable = (SELECT [Field] FROM [Table] WHERE [FIELD] = Value)
But I am looking for something like this
IF EXIST(SELECT * FROM [Table] WHERE [FIELD1] = Value1 AND [Field2] = Value2)
November 11, 2008 8:23 AM
October 23, 2013 2:17 PM