Home
How It Works
Daily Challenge
Contact

Companies
Register
Login
Recruiter Tools
Post SqlAds
Resume Razor
Candidates
Register
Login
My Info
Employment
Submit Question
Training
Intro to
Informatica
Ask Mark
Recent Topics
Resume Courier
Top 10
grabowski
vlg
anjugarg
billw
jjahns
drj
nisha
nishardhini
grifman
kalaabhyas
 

Pete Russitano Design >


Yesterdays Results
86% Correct
14% Incorrect
Sponsored Jobs
Production Support Analyst - Unix, FTP
Bristol, CT
Momentum, Odin, ConnectDirect, Tidal, BARR, and Tandem application and O/S software   more...
Contact Us
Data Analyst
Shelton, CT
MSAccess, SQL Sever, SQL, DBase, Clipper, Foxpro   more...
Contact Us
DataStage Developer
Iowa, IA
DataStage, Informatica, Oracle, Team Leader   more...
Contact Us
Data Modeler
Shelton, CT
UML, Rational, RequisitePro   more...
Contact Us
Project Manager (Multiple)
Windsor, CT
Junior to Senior Level Project Managers with Insurance Background   more...
Contact Us
DB2 DBA
New Haven Area, CT
DB2, DBA, Logical & Physical Modeling   more...
Contact Us
Business Analyst
Windsor, CT
Insurance B/A   more...
Contact Us
Saiko Consulting's SqlChallenge
Saiko Consulting's SqlChallenge
CareerFactor
Saiko Consulting

Read A Topic

Return To Topics Originally Posted:  6/23/2006 7:27:18 PM
  Last Updated:  6/23/2006 7:41:25 PM

Subject:
DailyChallenge 06/22/2006

You Asked....
I got today's question wrong and had a reference which seems to suggest I might have been right or that the question might be ambigious :

Source : http://publib.boulder.ibm.com/infocenter/rb63help/index.jsp?topic=/com.ibm.redbrick.doc6.3/ssg/ssg32.htm
A column alias can occur anywhere in a SELECT statement to designate the column to which it refers (for example, in a WHERE, ORDER BY , GROUP BY, or HAVING clause).

Important:
If the value contained in the column referenced by the column alias is the result of a set function, it cannot occur in the WHERE clause; however, it can occur in the HAVING clause.

Can you mail me for a clarification.

Question:

When a column is aliased in a SQL statement which of the following can utilize the column alias rather than having to use the names of the column from the table?

Example:

SELECT quantity*discount extprice FROM OrderDetails

and we responded....
I read your reference and you are correct.

However, this seems to be specific to a RedBrick implementation.

ANSI-SQL allows a column alias to be used on the ORDER BY clause but not on the HAVING, GROUP BY or WHERE.


others said.... Post Your Own Review