Click here to Skip to main content
15,887,267 members
Home / Discussions / Database
   

Database

 
QuestionORDER BY question Pin
leckey7-Jul-06 6:51
leckey7-Jul-06 6:51 
AnswerRe: ORDER BY question Pin
Jerry Hammond8-Jul-06 4:54
Jerry Hammond8-Jul-06 4:54 
GeneralRe: ORDER BY question Pin
Paul Conrad8-Jul-06 19:54
professionalPaul Conrad8-Jul-06 19:54 
GeneralRe: ORDER BY question Pin
Jerry Hammond9-Jul-06 3:22
Jerry Hammond9-Jul-06 3:22 
GeneralRe: ORDER BY question Pin
leckey10-Jul-06 3:17
leckey10-Jul-06 3:17 
GeneralRe: ORDER BY question Pin
Paul Conrad10-Jul-06 6:33
professionalPaul Conrad10-Jul-06 6:33 
Questiondynamic query in SQL Server 2000 Pin
SomeGuyThatIsMe7-Jul-06 4:50
SomeGuyThatIsMe7-Jul-06 4:50 
AnswerRe: dynamic query in SQL Server 2000 Pin
Eric Dahlvang7-Jul-06 5:57
Eric Dahlvang7-Jul-06 5:57 
Something like this will work:
CREATE PROCEDURE GetColumn 
@returnColumn varchar(100),@table varchar(100),@searchColumn varchar(100), @searchValue varchar(100)
AS

exec('select ' + @returnColumn + ' from ' + @table + ' where ' + @searchColumn + ' = ' + @searchValue)

But be sure to check out this article: SqlInjectionAttacks[^]

--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters

GeneralRe: dynamic query in SQL Server 2000 Pin
SomeGuyThatIsMe7-Jul-06 6:04
SomeGuyThatIsMe7-Jul-06 6:04 
Questionsound & video Pin
md_refay7-Jul-06 4:09
md_refay7-Jul-06 4:09 
AnswerRe: sound & video Pin
Not Active7-Jul-06 4:17
mentorNot Active7-Jul-06 4:17 
AnswerRe: sound & video Pin
Scott Serl7-Jul-06 6:05
Scott Serl7-Jul-06 6:05 
QuestionBEGIN and END Pin
Brendan Vogt7-Jul-06 0:25
Brendan Vogt7-Jul-06 0:25 
AnswerRe: BEGIN and END Pin
Mike Dimmick7-Jul-06 2:54
Mike Dimmick7-Jul-06 2:54 
GeneralRe: BEGIN and END Pin
Frank Kerrigan7-Jul-06 3:16
Frank Kerrigan7-Jul-06 3:16 
QuestionSQL query problem, thanks Pin
zouchao11126-Jul-06 20:42
zouchao11126-Jul-06 20:42 
AnswerRe: SQL query problem, thanks Pin
Glen Harvy6-Jul-06 22:27
Glen Harvy6-Jul-06 22:27 
GeneralRe: SQL query problem, thanks Pin
zouchao11127-Jul-06 3:32
zouchao11127-Jul-06 3:32 
GeneralRe: SQL query problem, thanks [modified] Pin
Glen Harvy7-Jul-06 11:53
Glen Harvy7-Jul-06 11:53 
GeneralRe: SQL query problem, thanks Pin
zouchao11127-Jul-06 20:41
zouchao11127-Jul-06 20:41 
QuestionHow to access xml tag in sql server column Pin
CandyMe6-Jul-06 19:39
CandyMe6-Jul-06 19:39 
AnswerRe: How to access xml tag in sql server column Pin
Colin Angus Mackay6-Jul-06 20:29
Colin Angus Mackay6-Jul-06 20:29 
QuestionSQL Query Problems [modified] Pin
teejayem6-Jul-06 14:23
teejayem6-Jul-06 14:23 
AnswerRe: SQL Query Problems Pin
teejayem6-Jul-06 15:08
teejayem6-Jul-06 15:08 
QuestionTyped DataRow and query with more then 1 table Pin
SlavaFromUkraine6-Jul-06 12:09
SlavaFromUkraine6-Jul-06 12:09 

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.