I am trying to make a proc with this code:create proc AddImages ( @Error smallint output, @ImageName varchar(50), @Game varchar(25), @SubSet varchar(25), @FullSubSet varchar(75), @Width smallint, @Height smallint, @AltText varchar(50)) asdeclare @AbbreviationExists varchar(25), @ImageExists varchar(25)set @AbbreviationExists = (select Short from Eaglef90.Abbreviations where Short = @SubSet)set @ImageExists = (select ImageName, Game, SubSet from Eaglef90.Images where ImageName = @ImageName and Game = @Game and SubSet = @SubSet)set @Error = 0if @AbbreviationExists is null insert Eaglef90.Abbreviations (Short, Long) values (@SubSet, @FullSubSet)if @ImageExists is null insert Eaglef90.Images (ImageName, Game, SubSet, Width, Height, AltText) values (@ImageName, @Game, @SubSet, @Width, @Height, @AltText)else set @Error = 1
but when I hit execute in Query Analizer I recive this error:Msg 116, Level 16, State 1, Procedure AddImages, Line 7Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
Line 7 has this code on it:set @ImageExists = (select ImageName, Game, SubSet from Eaglef90.Images where ImageName = @ImageName and Game = @Game and SubSet = @SubSet)
Does anyone know what is wrong with that select statement?-- If I get used to envying others...Those things about my self I pride will slowly fade away.-Stellvia