Click here to Skip to main content
15,888,113 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL Server Query Help (Trying to compare two tables and display the nonmatching records Pin
Michael Potter20-Sep-06 5:11
Michael Potter20-Sep-06 5:11 
QuestionDatatype conversion in a SQL statement - need help Pin
Slow Learner19-Sep-06 2:38
Slow Learner19-Sep-06 2:38 
AnswerRe: Datatype conversion in a SQL statement - need help Pin
albCode19-Sep-06 4:42
albCode19-Sep-06 4:42 
QuestionDifference between SqlCommand and SqlCommandBuilder Pin
param thaker19-Sep-06 2:30
param thaker19-Sep-06 2:30 
AnswerRe: Difference between SqlCommand and SqlCommandBuilder Pin
Kschuler19-Sep-06 10:57
Kschuler19-Sep-06 10:57 
GeneralRe: Difference between SqlCommand and SqlCommandBuilder Pin
Rob Graham19-Sep-06 12:59
Rob Graham19-Sep-06 12:59 
QuestionReporting Services Parameter Dependencies Pin
CandyMe19-Sep-06 1:18
CandyMe19-Sep-06 1:18 
QuestionSelect Column (as Parameter) from Table Pin
CandyMe19-Sep-06 0:52
CandyMe19-Sep-06 0:52 
Sorry, I have this sql statement where I supply the column as parameter
and then use it to retrieve the values of the specified column.
Instead result is column name =(

declare @sql varchar(200)

SELECT @sql = 'SELECT COLUMN_NAME AS Columns
FROM information_schema.columns
WHERE (TABLE_NAME = ''MyTable'') and
(Column_name = ''Column1'')'

exec ('select (' + @sql + ') from MyTable')

RESULT:

Columns
-------
Column1
Column1
Column1
Column1
Column1

Help Please! Thanks!

Gerri
AnswerRe: Select Column (as Parameter) from Table Pin
_AK_19-Sep-06 1:28
_AK_19-Sep-06 1:28 
AnswerRe: Select Column (as Parameter) from Table Pin
albCode19-Sep-06 5:13
albCode19-Sep-06 5:13 
GeneralRe: Select Column (as Parameter) from Table Pin
CandyMe19-Sep-06 16:23
CandyMe19-Sep-06 16:23 
AnswerRe: Select Column (as Parameter) from Table Pin
Michael Potter20-Sep-06 5:32
Michael Potter20-Sep-06 5:32 
GeneralRe: Select Column (as Parameter) from Table Pin
CandyMe20-Sep-06 17:20
CandyMe20-Sep-06 17:20 
QuestionSystem.Data.DB.ConcurrencyException Pin
kishorepv18-Sep-06 23:10
kishorepv18-Sep-06 23:10 
AnswerRe: System.Data.DB.ConcurrencyException Pin
_AK_19-Sep-06 1:32
_AK_19-Sep-06 1:32 
GeneralRe: System.Data.DB.ConcurrencyException Pin
kishorepv19-Sep-06 19:33
kishorepv19-Sep-06 19:33 
GeneralRe: System.Data.DB.ConcurrencyException Pin
_AK_19-Sep-06 19:36
_AK_19-Sep-06 19:36 
GeneralRe: System.Data.DB.ConcurrencyException Pin
kishorepv19-Sep-06 21:16
kishorepv19-Sep-06 21:16 
GeneralRe: System.Data.DB.ConcurrencyException Pin
_AK_19-Sep-06 21:21
_AK_19-Sep-06 21:21 
GeneralRe: System.Data.DB.ConcurrencyException Pin
kishorepv19-Sep-06 21:30
kishorepv19-Sep-06 21:30 
GeneralRe: System.Data.DB.ConcurrencyException Pin
_AK_19-Sep-06 21:37
_AK_19-Sep-06 21:37 
GeneralRe: System.Data.DB.ConcurrencyException Pin
kishorepv19-Sep-06 23:04
kishorepv19-Sep-06 23:04 
QuestionSearch for word in SP Pin
VK-Cadec18-Sep-06 7:35
VK-Cadec18-Sep-06 7:35 
AnswerRe: Search for word in SP Pin
Scott Serl18-Sep-06 9:58
Scott Serl18-Sep-06 9:58 
QuestionWhy are my tables 'read only'? Pin
Zdenek Navratil17-Sep-06 23:57
Zdenek Navratil17-Sep-06 23:57 

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.