|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
I would like to pass into a stored proc the column names I want it to return; how do I do this please?
So I pass in say: @p_AccountNumber with a value of 'AccountNum' and the SELECT that the sp fires is of the form SELECT AccountNum from AccountTable Any help appreciated |
|
#2
|
|||
|
|||
|
Look at sp_executesql. You can build a 'select' statement in a varchar variable in your Stored Proc and execute it.
Quote:
|
|
#3
|
|||
|
|||
|
Thanks
Quote:
Thanks for the response, I have got it going now |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Column Names as Parameters |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|