|
|
| Stanley 2005-09-30, 7:23 am |
| Hi all! I'm trying to set the value of @d to a value from col1 in
tblTest. I have tried the following code but it didn't work.
DECLARE @d VARCHAR(25)
SELECT * FROM tblTest
SET @d = tblTest.col1
Someone please help me! Thanks!
| |
| Nik Marshall-Blank \(delete fcom for my email addr 2005-09-30, 7:23 am |
| SELECT @d = col1 FROM tblTest
or
SET @d = SELECT col1 FROM tblTest
Where col1 is THE COLUMN NAME not the first column.
--
Nik Marshall-Blank MCSD/MCDBA
"Stanley" <xstanley@gmail.com> wrote in message
news:1128081085.771682.230680@f14g2000cwb.googlegroups.com...
> Hi all! I'm trying to set the value of @d to a value from col1 in
> tblTest. I have tried the following code but it didn't work.
>
> DECLARE @d VARCHAR(25)
> SELECT * FROM tblTest
> SET @d = tblTest.col1
>
> Someone please help me! Thanks!
>
| |
|
| DECLARE @d VARCHAR(25)
SELECT @d = col1 FROM tblTest
http://sqlservercode.blogspot.com/
"Stanley" wrote:
> Hi all! I'm trying to set the value of @d to a value from col1 in
> tblTest. I have tried the following code but it didn't work.
>
> DECLARE @d VARCHAR(25)
> SELECT * FROM tblTest
> SET @d = tblTest.col1
>
> Someone please help me! Thanks!
>
>
| |
| Stanley 2005-09-30, 9:23 am |
| Thanks so much, that's what I really need!!
|
|
|
|