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 |
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2006-02-12 : 09:19:33
|
| nameing cols from a result called from STORED PROCEDURES!i am calling a SP with some paams like this[CODE]sp_name @val1=2323,....[/CODE]the thing is that every time i call diffrent tables and so on and recive diffret caolumn names!can i as part as the quesry give the column name name as i whichso the returned result will have the name that i want withought making any changes in the SP itself?thnaks in advancepeelgIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-02-12 : 09:28:18
|
quote: can i as part as the quesry give the column name name as i whichso the returned result will have the name that i want
You can you column alias to change the column name in the result set in the stored procedure.quote: withought making any changes in the SP itself?
create a temp table as per the result set of the spcreate table #temp( . . . )insert into #temp exec sp_name @val1=2323,.... ----------------------------------'KH'everything that has a beginning has an end |
 |
|
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2006-02-12 : 14:57:37
|
can id just insert into #temp exec sp_name @val1=2323,.... withoguht creating/defininf the temp table?can i access a temp table from ASP which was made on the sql server?Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-02-12 : 16:54:46
|
quote: Originally posted by pelegk2 can id just insert into #temp exec sp_name @val1=2323,.... withoguht creating/defininf the temp table?can i access a temp table from ASP which was made on the sql server?Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Yes----------------------------------'KH'everything that has a beginning has an end |
 |
|
|
|
|
|