all groups > sql server new users > november 2006 >
You're in the

sql server new users

group:

Easy .. .syntax


Re: Easy .. .syntax Kalen Delaney
11/10/2006 1:50:34 PM
sql server new users:
Answer: a derived table needs an alias

[quoted text, click to view]

Question: Why do you need a derived table, why not just use the inner query:
[quoted text, click to view]

--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com


[quoted text, click to view]

Easy .. .syntax Alejandro
11/10/2006 4:19:06 PM
What is wrong with this statement ?

SELECT Caseid
FROM (SELECT DISTINCT Caseid, userid FROM Atts)

A

Re: Easy .. .syntax Hilary Cotter
11/10/2006 7:27:19 PM
there is nothing wrong with the statement. As long as you include the A in
the query, ie

SELECT Caseid
FROM (SELECT DISTINCT Caseid, userid FROM Atts) A



--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

AddThis Social Bookmark Button