Click here to Skip to main content
       

Database

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: Having a bad SQL daymemberShameel13 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 daymemberJörgen Andersson13 Feb '13 - 0:56 
You are looking for CTE.
"The ones who care enough to do it right care too much to compromise."
Matthew Faithfull

GeneralRe: Having a bad SQL daymemberPIEBALDconsult13 Feb '13 - 4:01 
Yes, or a simple
 
SELECT ... FROM
(
  SELECT ... FROM table WHERE ...
) T
...

GeneralRe: Having a bad SQL daymemberJörgen Andersson13 Feb '13 - 6:27 
Yes, thats equivalent. I just prefer the readability of the CTE (which is merely an opinion) plus that you can refer to a CTE in more than one place.
"The ones who care enough to do it right care too much to compromise."
Matthew Faithfull

QuestionWhat is Ado.netmemberHimanshu Sharma 88812 Feb '13 - 19:20 
Ado.net is the Library in .net technology. this library help to you for connect your application to the database.
 
- Now Come in depth
 
C# is a language. and responsible to create the User Interface like Console, Web, and Window Application.
 
SQL is also language for create the database and database store the data.
 
Suppose i need to connect my Front-End to the Back-End.
or We say that C# Communicate to the SQL. now its not possible to two different language communicate to each other. Simple Example is
One Person is Russian and second is Indian now they want to talk to each other. Big Problem Occur when they want to communicate because Russian not known the Hindi language and similar Indian not know the Russian Language. now both person need to mediator or Converter. Converter convert the language means for Indian to Hindi and Russian to Russian Language.
 
-----Ado.Net Mediator between the Front-End to the Back-End-----
Ado.Net is provider to make the connection between the Front-End to the Back-End.
 
Thank you
Student of Dr. Sandeep Karan CAC Noida
Himanshu Sharma

AnswerRe: What is Ado.netmvpRichard MacCutchan12 Feb '13 - 22:31 
And what is your question?
GeneralRe: What is Ado.netmemberShameel13 Feb '13 - 0:44 
That's not a question, it's a Tip (or atleast he thinks so)
GeneralRe: What is Ado.netmemberThomas Gabriel20 Feb '13 - 22:42 
This is really a great tip for the beginners.
i thank you from all the Beginners those who need a Elaborated definition to understand the concepts..
AnswerRe: What is Ado.netmvpSandeep Mewara13 Feb '13 - 0:23 
If you seek more knowledge on how to talk to database from C# using ADO.NET, read:
MSDN: ADO.NET[^]
MSDN: Accessing Data with ADO.NET[^]
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]
 
[My Latest Post]: How to extend a WPF Textbox to Custom Picker

QuestionSQL 2008 Truncate vs Deletemembermrfalk12 Feb '13 - 6:47 
What is the difference between truncating and deleting a table?
 
After the truncating or deleting do we need to re-index or shrink the table?
 
We are looking to do some clean-up on some rather large tables on our database. Once we do the clean-up what steps do we need to preform for overall database "health"?
 
Thanks!

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


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 23 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid