Click here to Skip to main content
16,003,555 members
Home / Discussions / Database
   

Database

 
AnswerRe: Having a bad SQL day Pin
Shameel13-Feb-13 0:53
professionalShameel13-Feb-13 0:53 
To add to Jorgen's answer, I've always wondered why SQL Server doesn't allow us to use alias in WHERE and HAVING clauses. The answer to that lies in the logical order in which the query is processed. The WHERE and HAVING clauses are processed before the SELECT clause and the alias do not exist at that stage.

However, technically it should be possible to introduce another stage earlier in the query processing pipeline where a mapping between expressions and their alias is made and WHERE and HAVING clauses can look up to these mappings and substitute the actual expression in place of the alias.
GeneralRe: Having a bad SQL day Pin
Jörgen Andersson13-Feb-13 0:56
professionalJörgen Andersson13-Feb-13 0:56 
GeneralRe: Having a bad SQL day Pin
PIEBALDconsult13-Feb-13 4:01
mvePIEBALDconsult13-Feb-13 4:01 
GeneralRe: Having a bad SQL day Pin
Jörgen Andersson13-Feb-13 6:27
professionalJörgen Andersson13-Feb-13 6:27 
QuestionWhat is Ado.net Pin
Himanshu Sharma 88812-Feb-13 19:20
Himanshu Sharma 88812-Feb-13 19:20 
AnswerRe: What is Ado.net Pin
Richard MacCutchan12-Feb-13 22:31
mveRichard MacCutchan12-Feb-13 22:31 
GeneralRe: What is Ado.net Pin
Shameel13-Feb-13 0:44
professionalShameel13-Feb-13 0:44 
GeneralRe: What is Ado.net Pin
Thomas Gabriel20-Feb-13 22:42
Thomas Gabriel20-Feb-13 22:42 
AnswerRe: What is Ado.net Pin
Sandeep Mewara13-Feb-13 0:23
mveSandeep Mewara13-Feb-13 0:23 
QuestionSQL 2008 Truncate vs Delete Pin
mrfalk12-Feb-13 6:47
mrfalk12-Feb-13 6:47 
AnswerRe: SQL 2008 Truncate vs Delete Pin
Eddy Vluggen12-Feb-13 7:48
professionalEddy Vluggen12-Feb-13 7:48 
GeneralRe: SQL 2008 Truncate vs Delete Pin
mrfalk12-Feb-13 8:27
mrfalk12-Feb-13 8:27 
GeneralRe: SQL 2008 Truncate vs Delete Pin
Eddy Vluggen12-Feb-13 8:36
professionalEddy Vluggen12-Feb-13 8:36 
GeneralRe: SQL 2008 Truncate vs Delete Pin
Khorshed Alam, Dhaka18-Feb-13 18:09
Khorshed Alam, Dhaka18-Feb-13 18:09 
AnswerRe: SQL 2008 Truncate vs Delete Pin
NickPace12-Feb-13 10:09
NickPace12-Feb-13 10:09 
AnswerRe: SQL 2008 Truncate vs Delete Pin
Corporal Agarn13-Feb-13 3:59
professionalCorporal Agarn13-Feb-13 3:59 
AnswerRe: SQL 2008 Truncate vs Delete Pin
gvprabu20-Feb-13 21:37
gvprabu20-Feb-13 21:37 
QuestionSQL Server 2008 Pin
VishwaKL10-Feb-13 17:51
VishwaKL10-Feb-13 17:51 
AnswerRe: SQL Server 2008 Pin
Shameel10-Feb-13 22:33
professionalShameel10-Feb-13 22:33 
AnswerRe: SQL Server 2008 Pin
jschell11-Feb-13 8:20
jschell11-Feb-13 8:20 
Questionupdate values in a table in single query Pin
nainakarri7-Feb-13 20:07
nainakarri7-Feb-13 20:07 
AnswerRe: update values in a table in single query Pin
Mycroft Holmes7-Feb-13 21:00
professionalMycroft Holmes7-Feb-13 21:00 
GeneralRe: update values in a table in single query Pin
Shameel10-Feb-13 22:38
professionalShameel10-Feb-13 22:38 
GeneralRe: update values in a table in single query Pin
Mycroft Holmes11-Feb-13 13:30
professionalMycroft Holmes11-Feb-13 13:30 
AnswerRe: update values in a table in single query PinPopular
Eddy Vluggen7-Feb-13 22:42
professionalEddy Vluggen7-Feb-13 22:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.