Click here to Skip to main content
16,021,994 members
Home / Discussions / Database
   

Database

 
GeneralRe: escaping Pin
Gamzun25-Jun-07 22:13
Gamzun25-Jun-07 22:13 
GeneralRe: escaping Pin
V.25-Jun-07 22:20
professionalV.25-Jun-07 22:20 
GeneralRe: escaping Pin
Colin Angus Mackay26-Jun-07 0:08
Colin Angus Mackay26-Jun-07 0:08 
GeneralRe: escaping Pin
Colin Angus Mackay26-Jun-07 0:09
Colin Angus Mackay26-Jun-07 0:09 
GeneralRe: escaping Pin
Gamzun26-Jun-07 0:13
Gamzun26-Jun-07 0:13 
QuestionTransfer Data from MS SQL to Oracle Pin
Gamzun25-Jun-07 21:18
Gamzun25-Jun-07 21:18 
AnswerRe: Transfer Data from MS SQL to Oracle Pin
Devkranth Kishore Vanja28-Jun-07 20:48
Devkranth Kishore Vanja28-Jun-07 20:48 
QuestionQuery columns by name in stored procedures (SQL Server 2005) Pin
Tobias Schoenig25-Jun-07 19:20
Tobias Schoenig25-Jun-07 19:20 
Hi folks,

I got a question concerning stored procedures and I didn't find anything helpful on the comment search or via google:
I need to query a single column in a stored procedure but I want to identify this column with a VarChar-parameter, so that I can use one stored procedure for all columns in a table. Maybe there's also a way to design such a stored procedure even with whole tables. What I'm looking for is a stored procedure like this:

<br />
CREATE PROCEDURE [dbo].[GetValueFromMyTable]<br />
( @Column varchar )<br />
AS<br />
BEGIN<br />
SELECT @Column FROM MyTable <br />
END<br />


The code seems to be correct, but the statement doesn't work the way I want it to work. Does anyone have an idea about my problem?

Thanks in advance, Tobias
AnswerRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Puneet Sri25-Jun-07 19:44
Puneet Sri25-Jun-07 19:44 
GeneralRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Tobias Schoenig25-Jun-07 20:00
Tobias Schoenig25-Jun-07 20:00 
GeneralRe: Query columns by name in stored procedures (SQL Server 2005) Pin
vimal_yet25-Jun-07 21:28
vimal_yet25-Jun-07 21:28 
GeneralRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Tobias Schoenig25-Jun-07 23:10
Tobias Schoenig25-Jun-07 23:10 
GeneralRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Tobias Schoenig26-Jun-07 19:20
Tobias Schoenig26-Jun-07 19:20 
AnswerRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Arun.Immanuel25-Jun-07 21:00
Arun.Immanuel25-Jun-07 21:00 
Questionsolution wen server goes down Pin
zareee25-Jun-07 17:12
zareee25-Jun-07 17:12 
AnswerRe: solution wen server goes down Pin
originSH25-Jun-07 22:18
originSH25-Jun-07 22:18 
QuestionQuery from Hell Pin
Hulicat25-Jun-07 14:12
Hulicat25-Jun-07 14:12 
QuestionMySQL or SQL Server 2005 Pin
kani9825-Jun-07 12:45
kani9825-Jun-07 12:45 
AnswerRe: MySQL or SQL Server 2005 Pin
Christian Graus25-Jun-07 13:24
protectorChristian Graus25-Jun-07 13:24 
GeneralRe: MySQL or SQL Server 2005 Pin
Paul Conrad25-Jun-07 13:52
professionalPaul Conrad25-Jun-07 13:52 
AnswerRe: MySQL or SQL Server 2005 Pin
originSH25-Jun-07 23:27
originSH25-Jun-07 23:27 
QuestionDateTime Pin
seemamltn25-Jun-07 10:28
seemamltn25-Jun-07 10:28 
AnswerRe: DateTime Pin
Colin Angus Mackay25-Jun-07 11:32
Colin Angus Mackay25-Jun-07 11:32 
QuestionIs it possible to access a row in a datatable in constant time? Pin
Ryan Andrus25-Jun-07 9:34
Ryan Andrus25-Jun-07 9:34 
AnswerRe: Is it possible to access a row in a datatable in constant time? [modified] Pin
Colin Angus Mackay25-Jun-07 9:46
Colin Angus Mackay25-Jun-07 9:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.