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
 General SQL Server Forums
 New to SQL Server Programming
 To move values from table to variables

Author  Topic 

Sqlfreak
Starting Member

5 Posts

Posted - 2009-09-22 : 04:31:45
hi,

i am new to MS SQL.
i am currently working on SQL server 2008.
i would want to know how i can extract certain values from a table say the product code and name and then move them into variables where i can then use them for different processing?
also, will i be able to call another procedure from within a procedure i have created?

i would appreciate if you could provide some sample codes also to solve my query.

Thanks in advance.

"live and let live..."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-22 : 05:00:56
Declare @prod_code varchar(100), @name varchar(100)
select @prod_code=prod_code,@name=name from table where .....

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -