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.
| Author |
Topic |
|
John T.
Posting Yak Master
112 Posts |
Posted - 2003-06-16 : 15:49:57
|
| Hope all is well with you people.I have a table, Test. Two columns. Name and Inform. Name is vc 50 and Inform is vc 500.CREATE PROCEDURE TestPP @name varchar(50),@ppinfo varchar(500) ASUpdate TestPP Set Inform = @ppinfo where Name = @nameGOThe above sproc works fine.When I try the following, I get the error "invalid column".CREATE PROCEDURE LoadPP @name varchar(50), @ppinfo varchar(500) OUTPUT AsSelect Inform from TestPP where Name = @nameSet @ppinfo = InformGOIn the first sproc, I simply write data from a textbox to the db. In the second one, I want to take the info in Inform and pass it to my program.Thanks for any help. I have tried on my local server and remote host to create this sproc. Same results so I guess I will learn something here.John |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-06-16 : 16:03:46
|
| You have to set @@ppinfo in the SELECT statement.CREATE PROCEDURE LoadPP @name varchar(50), @ppinfo varchar(500) OUTPUT As Select @ppinfo = Inform from TestPP where Name = @name GOTara |
 |
|
|
John T.
Posting Yak Master
112 Posts |
Posted - 2003-06-16 : 16:06:52
|
| Thanks Tara. |
 |
|
|
|
|
|