Click here to Skip to main content
15,845,212 members
Home / Discussions / Database
   

Database

 
GeneralRe: escaping Pin
Gamzun25-Jun-07 23:13
Gamzun25-Jun-07 23:13 
GeneralRe: escaping Pin
V.25-Jun-07 23:20
professionalV.25-Jun-07 23:20 
GeneralRe: escaping Pin
Colin Angus Mackay26-Jun-07 1:08
Colin Angus Mackay26-Jun-07 1:08 
GeneralRe: escaping Pin
Colin Angus Mackay26-Jun-07 1:09
Colin Angus Mackay26-Jun-07 1:09 
GeneralRe: escaping Pin
Gamzun26-Jun-07 1:13
Gamzun26-Jun-07 1:13 
QuestionTransfer Data from MS SQL to Oracle Pin
Gamzun25-Jun-07 22:18
Gamzun25-Jun-07 22:18 
AnswerRe: Transfer Data from MS SQL to Oracle Pin
Devkranth Kishore Vanja28-Jun-07 21:48
Devkranth Kishore Vanja28-Jun-07 21:48 
QuestionQuery columns by name in stored procedures (SQL Server 2005) Pin
Tobias Schoenig25-Jun-07 20:20
Tobias Schoenig25-Jun-07 20: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 20:44
Puneet Sri25-Jun-07 20:44 
GeneralRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Tobias Schoenig25-Jun-07 21:00
Tobias Schoenig25-Jun-07 21:00 
GeneralRe: Query columns by name in stored procedures (SQL Server 2005) Pin
vimal_yet25-Jun-07 22:28
vimal_yet25-Jun-07 22:28 
GeneralRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Tobias Schoenig26-Jun-07 0:10
Tobias Schoenig26-Jun-07 0:10 
GeneralRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Tobias Schoenig26-Jun-07 20:20
Tobias Schoenig26-Jun-07 20:20 
AnswerRe: Query columns by name in stored procedures (SQL Server 2005) Pin
Arun.Immanuel25-Jun-07 22:00
Arun.Immanuel25-Jun-07 22:00 
Questionsolution wen server goes down Pin
zareee25-Jun-07 18:12
zareee25-Jun-07 18:12 
AnswerRe: solution wen server goes down Pin
originSH25-Jun-07 23:18
originSH25-Jun-07 23:18 
QuestionQuery from Hell Pin
Hulicat25-Jun-07 15:12
Hulicat25-Jun-07 15:12 
QuestionMySQL or SQL Server 2005 Pin
kani9825-Jun-07 13:45
kani9825-Jun-07 13:45 
AnswerRe: MySQL or SQL Server 2005 Pin
Christian Graus25-Jun-07 14:24
protectorChristian Graus25-Jun-07 14:24 
GeneralRe: MySQL or SQL Server 2005 Pin
Paul Conrad25-Jun-07 14:52
professionalPaul Conrad25-Jun-07 14:52 
AnswerRe: MySQL or SQL Server 2005 Pin
originSH26-Jun-07 0:27
originSH26-Jun-07 0:27 
QuestionDateTime Pin
seemamltn25-Jun-07 11:28
seemamltn25-Jun-07 11:28 
AnswerRe: DateTime Pin
Colin Angus Mackay25-Jun-07 12:32
Colin Angus Mackay25-Jun-07 12:32 
QuestionIs it possible to access a row in a datatable in constant time? Pin
Ryan Andrus25-Jun-07 10:34
Ryan Andrus25-Jun-07 10:34 
AnswerRe: Is it possible to access a row in a datatable in constant time? [modified] Pin
Colin Angus Mackay25-Jun-07 10:46
Colin Angus Mackay25-Jun-07 10: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.