Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 masking

Author  Topic 

tedew
Starting Member

22 Posts

Posted - 2005-10-02 : 12:23:20
hello,
I wrote the procedure which is adding data to the table.
The procedure is accepting two parameters. ( @kat and @ele )


CREATE PROCEDURE add_itm @kat varchar(50),@ele varchar(50) AS
DECLARE @id_kat int
select @id_kat = id_kat from tbl_kategoria where nazwa=@kat
insert into tbl_element values(@ele', @id_kat)
GO



but is the problem - this two variables must be in " '' " , but then they aren't variables only strings
is some advice for it ??

bye,
sorry for my english



spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-10-02 : 13:19:53
simply do:
insert into tbl_element
select @ele, id_kat
from tbl_kategoria where nazwa=@kat


Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -