Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi 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!
Post Follow-up to this messageSELECT @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! >
Post Follow-up to this messageDECLARE @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! > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread