Iann,
For example:
DECLARE @NewLoginID NVARCHAR(225)
SET @NewLoginID = 'Fred'
IF EXISTS (SELECT * FROM Customer WHERE LoginID = @NewLoginID)
-- Do whatever you want to give the user a message
ELSE
-- Process the new customer
RLF
"lann" <u50349@uwe> wrote
Quote:
Hi I am a SQL new bie.
I searched the forum but couldn't find an exact match of my requirements.
Apologies if I had created a new thread for an existing discussion
I have a table Customer.In customer table I have a column LoginID nvarchar
(225).
I would like to have a SQL stored procedure to check whether the entered
Login already exists in the LoginID column.
If not i like to give the user some message directing to register.
Please help. |