Re: alter column name
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 06/01/04
- Next message: Aaron [SQL Server MVP]: "Re: Cannot insert Stored Procedure"
- Previous message: Aaron [SQL Server MVP]: "Re: Alter table question"
- In reply to: jfmoyn: "Re: alter column name"
- Next in thread: Roji. P. Thomas: "Re: alter column name"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Jun 2004 16:52:12 -0400
You cannot do this, because you cannot use a GO command in a stored
procedure, and you cannot rename a column and use that column name in the
same batch (the parser will complain long before the code even tries to
execute).
Who is asking you to create a #temp table, never mind create a #temp table
with column names that contain actual data?
Why not return the "column name" as data instead of as a true column name?
The presentation tool can deal with how to show the result to the user.
-- http://www.aspfaq.com/ (Reverse address to reply.) "jfmoyn" <anonymous@discussions.microsoft.com> wrote in message news:222F8A53-F619-4ECC-9CF2-10F6EB4D2B7A@microsoft.com... > I asked a simple question. Is there any way to change the name of a column in a temporary table created in a stored procedure? I understand quite well that the format I am using doesn't fit the ideal model, but I was asked to create the table in this manner. Doing it this way serves two purposes, first it allows my customer to execute the stored procedure in the query tool and get the table displayed as a grid in a simple format. Second, I can bring the table into an existing asp page. This asp page was written to execute a stored procedure and display the results in this format. When the customer is done reviewing the table, it's gone. > > When given the choice to please my customer or to please CELKO and his followers, I choose to please my customer. > > I do have a question for discussion. > > How much more valuble would you be if you answered questions in this newsgroup with the intention of being helpful? > > I appreciate the helpful suggestions I did receive. >
- Next message: Aaron [SQL Server MVP]: "Re: Cannot insert Stored Procedure"
- Previous message: Aaron [SQL Server MVP]: "Re: Alter table question"
- In reply to: jfmoyn: "Re: alter column name"
- Next in thread: Roji. P. Thomas: "Re: alter column name"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|