You are here: Re: Help selecting an alias « MsSQL Server « IT news, forums, messages
Re: Help selecting an alias

Posted by DickChristoph on 03/25/06 00:03

Hi

I don't understand what you mean. Is the column SQL, SQL Server Code and the
column Oracle, Oracle Code? If so why would the alias SQL be 'one' and the
alias Oracle be 'two'

> SELECT Cod1 as SQL, Cod2 as Oracle FROM table WHERE SQL = 'one' AND
> Oracle = 'two'
As written I assume you mean something like

Select SQL, Oracle from
(SELECT Cod1 as SQL, Cod2 as Oracle FROM table) ss
WHERE SQL = 'one' AND Oracle = 'two'

Which is the same as

SELECT Cod1 as SQL, Cod2 as Oracle FROM table WHERE Cod1 = 'one' AND Cod2 =
'two'

neither of which appear to be too useful.

Please post some DDL and expected output.
--
-Dick Christoph
"Pumkin" <PopClaudia@gmail.com> wrote in message
news:1143202849.620253.156550@z34g2000cwc.googlegroups.com...
> Hello guys, I need help in something as I don't know if it is possible
> what I want.
> I have a select like this...
>
> SELECT Cod1 as SQL, Cod2 as Oracle FROM table
>
> and I need to sort by alias SQL or Oracle as the select is composed
> dinamically so it could be either Cod1 as SQL or Cod2 as SQL and the
> user needs to filter the data using SQL or ORACLE.
>
> I need something like this:
>
> SELECT Cod1 as SQL, Cod2 as Oracle FROM table WHERE SQL = 'one' AND
> Oracle = 'two'
>
> Any ideas?
>
> Thank you
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация