Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT x AS 'y'
Message
 
 
To
03/02/2009 12:54:36
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01379000
Message ID:
01379011
Views:
21
Bonnie,

Like the others said SQLServer isn't natively that dynamic without making the whole TSql statement dynamic. I'm not sure what is consuming the result but I think it's trivial to rename a column of a DataSet object once it gets down to your .Net code.

>I'd like to parameterize this, but if I try this it gives an incorrect syntax error:
>
>DECLARE @KeyName varchar(50)
>SET @KeyName = 'codesdeptkey'
>SELECT CodesKey AS @KeyName, * from codes
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform