Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

EXCEPT - 1 Expand / Collapse
Author
Message
Posted Monday, May 20, 2013 1:22 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, October 20, 2014 11:29 AM
Points: 3,354, Visits: 2,001
Nice and easy, thanks!
Post #1454703
Posted Monday, May 20, 2013 10:28 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, October 20, 2014 3:10 AM
Points: 856, Visits: 163
Nice one....
Post #1454806
Posted Wednesday, May 22, 2013 8:56 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, October 16, 2014 7:54 AM
Points: 959, Visits: 561
Nice and interesting one..

--
Dineshbabu
Desire to learn new things..
Post #1455564
Posted Monday, May 27, 2013 4:58 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 8:11 AM
Points: 270, Visits: 236
EXCEPT returns any distinct values from the left query that are not also found on the right query. The key to this is of course the use of DISTINCT.


Really new thing added into my database


Manik
You cannot get to the top by sitting on your bottom.
Post #1457057
Posted Tuesday, May 28, 2013 12:58 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, October 10, 2014 7:07 AM
Points: 3,545, Visits: 2,654
DISTINCT was clearly the key here. Thanks for this basic question.
Post #1457208
Posted Tuesday, May 28, 2013 3:42 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 10:05 AM
Points: 1,782, Visits: 6,479
Easy enough if you know how EXCEPT and related options work.

But don't quite understand the statement "The key to this is of course the use of DISTINCT".
There is no use of DISTINCT, so how can it be the key to anything?
Post #1457244
Posted Tuesday, May 28, 2013 3:53 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:10 PM
Points: 6,046, Visits: 8,325
Toreador (5/28/2013)
But don't quite understand the statement "The key to this is of course the use of DISTINCT".
There is no use of DISTINCT, so how can it be the key to anything?

First sentence of the explanation, emphasis mine:
"EXCEPT returns any distinct values from the left query that are not also found on the right query"



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1457248
Posted Tuesday, May 28, 2013 3:55 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 10:05 AM
Points: 1,782, Visits: 6,479
I guess you're right. I'd assumed it meant the keyword DISTINCT, given that it was in uppercase :)
Post #1457249
Posted Monday, June 3, 2013 1:01 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 8:03 AM
Points: 825, Visits: 319
skanker (5/20/2013)
Thanks for the question. It might be easy for others, however I learnt something on this. I did not do my research first and thought it would be three.


Same here.
Post #1459100
Posted Tuesday, June 18, 2013 7:58 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 3:24 AM
Points: 1,144, Visits: 299
Ignored completely the DISTINCT usage

leearned something today
Post #1464668
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse