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
 SQL Server Development (2000)
 Grabbing a column from a select SP

Author  Topic 

SimonGough
Starting Member

23 Posts

Posted - 2002-02-21 : 07:26:25
Hi,

I have a select statement which is pulling out multiple columns from a group of tables (which are joined)

How do i make a variable equal to one of those columns?

Thanks,
Simon

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-02-21 : 07:42:49
Hi

You can do

Select @blah = blah, @foo = bar FROM Table

But you can not combine a variable assignment and a select in the same statement i.e.

Select blah, @foo = bar FROM Table



Hope that helps.

Damian

Edited by - merkin on 02/21/2002 07:45:20
Go to Top of Page
   

- Advertisement -