Given below is the code for a stored procedure
the table as a ID that is stored for a new record is created
i need to modify the code so that it returns the id of the new record entered
[red]
[/red]
Thanks in advance for your help
regards (-:
Unicorn11
unicorn11@mailcity.com
[red]Luck is not chance, it's toil; fortune's expensive smile is earned.[red]
the table as a ID that is stored for a new record is created
i need to modify the code so that it returns the id of the new record entered
[red]
Code:
Create procedure SPW_NewSpec
@sSpecName varchar (100),
@sPass varchar (50),
@dtCreate datetime
as
if exists(select * from Q14 where TX_SpecName = @sSpecName)
begin
return(0)
end
else
begin
insert into Q14 (TX_SpecName, TX_pass, DT_Create)
values (@sSpecName, @sPass, @dtCreate)
return(1)
end
go
Thanks in advance for your help
regards (-:
Unicorn11
unicorn11@mailcity.com
[red]Luck is not chance, it's toil; fortune's expensive smile is earned.[red]