Re: alter column name

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 06/01/04


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.
>


Relevant Pages

  • Re: Timezone
    ... You need client side time, so your ToLocalTimeshould execute as Client ... I am not a expert in ASP. ... customer could be coming from LA, NY, etc. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Timezone
    ... the you have to execute it on client side.. ... have a clientside script run in your HTML? ... I am not a expert in ASP. ... customer could be coming from LA, NY, etc. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: The (near) future of book publishing
    ... wordprocessors, and will then be printed out by the reader, in any ... format the customer wishes, be it typewriter paper, hardbound glossy, ... have a Norton edition and a Cygnet edition and a (Random House ...
    (rec.gambling.poker)
  • Re: I need to find the months without activity.
    ... I do have a date field in the QryINVOICE called InvoiceDate, typically formatted as 'short date ddmmmyy' for data input. ... When I have to check any of the past data I always call it up via the monthly format from a query expression "Formatwhich works well. ... Now create a table that uses your Customer table and the date tableIt's important that there is no join between the tables in the upper pane of the query design window. ...
    (microsoft.public.access.queries)
  • Re: Ecommerce Server Requires Daily Reboot
    ... Sounds like you need a good ASP developer to go through ... SQL data caching schemes, to IIS settings, etc, etc, etc. ... a file cache on the web server. ... In order for customer to access webpage login, ...
    (microsoft.public.dotnet.framework.aspnet)