Home > Archive > MS SQL Server Clients > May 2005 > Column alias









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Column alias
Gopinath S

2005-05-18, 7:24 am

Can we have more than one column alias for a sinle column in the select
list.
Something like this
SELECT field1 A,B FROM Table
Jens Süßmeyer

2005-05-18, 7:24 am

What for do you need it ? (BTW, columns can only have one Alias)

--
HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---
"Gopinath S" < gopinath_s@nospamtri
gent.com> schrieb im Newsbeitrag
news:OAzset5WFHA.580@TK2MSFTNGP15.phx.gbl...
> Can we have more than one column alias for a sinle column in the select
> list.
> Something like this
> SELECT field1 A,B FROM Table



Gopinath S

2005-05-18, 7:24 am

Jens Süßmeyer wrote:
> What for do you need it ? (BTW, columns can only have one Alias)
>


Same stored procedure is being used by two different reports which
shoud have different aliases.

Thankx

Done a work around
Joh

2005-05-18, 9:23 am

You can use like this.....

select ContactName as Name, ContactName as SecondName from Customers

thanks

"Gopinath S" < gopinath_s@nospamtri
gent.com> wrote in message
news:#nqI175WFHA.3184@TK2MSFTNGP15.phx.gbl...
> Jens Süßmeyer wrote:
>
> Same stored procedure is being used by two different reports which
> shoud have different aliases.
>
> Thankx
>
> Done a work around



Hari Prasad

2005-05-18, 9:23 am

Hi,

No need to have different alias. You can very well use the same alias for
both the reports.

Thanks
Hari
SQL Server MVP


"Gopinath S" < gopinath_s@nospamtri
gent.com> wrote in message
news:%23nqI175WFHA.3184@TK2MSFTNGP15.phx.gbl...
> Jens Süßmeyer wrote:
>
> Same stored procedure is being used by two different reports which shoud
> have different aliases.
>
> Thankx
>
> Done a work around



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com