Hello All,
I am trying to get the value in variable in If Exists SQL statement. Is this possible ??? It is giving me syntax error.
Declare
@ErrMsgCode int,
@sErrorMsg nvarchar(500),
@sErrorSource nvarchar(500),
@OrgID int
SET @ErrMsgCode = -1;
IF EXISTS (SELECT OrgID = OrganizationID FROM ATS_Organization_Lang WHERE OrgName = 'abcd org')
ELSE
BEGIN
SET @ErrMsgCode = 1;
GOTO ERROR_HANDLER
END
If this is not the correct way, then how can validate the value(OrgName) and get the other value(OrgID) ??
Go to the complete details ...