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 ««12345»»»

Accessing and changing data 2008 Expand / Collapse
Author
Message
Posted Tuesday, September 23, 2008 6:35 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, November 6, 2014 1:00 PM
Points: 5,333, Visits: 25,277
I would like to thank all who have commented. I have learned a little more to apply to any additional QOD that I may submit. Please note that I relied on the
Merriam-Webster Dictionary definition for the words equivalent, and same which are:

Equivalent:
equal in force, amount, or value


Same:
equal in size, shape, value, or importance —usually used with the or a demonstrative (as that, those) in all senses


The main objective as I understand the QOD is to introduce readers to new and/or little known aspects of SQL Server it is my hope that this is what this question did.


If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #574263
Posted Tuesday, September 23, 2008 8:13 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:40 AM
Points: 2,480, Visits: 3,023
bitbucket (9/23/2008)
I would like to thank all who have commented. I have learned a little more to apply to any additional QOD that I may submit. Please note that I relied on the
Merriam-Webster Dictionary definition for the words equivalent, and same which are:

Equivalent:
equal in force, amount, or value


Same:
equal in size, shape, value, or importance —usually used with the or a demonstrative (as that, those) in all senses


The main objective as I understand the QOD is to introduce readers to new and/or little known aspects of SQL Server it is my hope that this is what this question did.


As a non-native english speaker I'm unaware of such small differences between the meaning of words.
For me: Same == Equivalent
But you are right about touching new aspects of SQL Server...


** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Post #574374
Posted Tuesday, September 23, 2008 8:31 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, December 2, 2014 8:26 AM
Points: 775, Visits: 1,203
I want my point back too


so, is it the SAME, or not?

I initial thought was I missed the UNION vs UNION ALL, but then it did have UNION ALL, so they were the SAME


Anyway, at least I don't feel too bad about getting it "almost" correct
considering I just finished reading the Introducing Microsoft SQL Server 2008 eBook, and reading Brad's SQL 2008 PDF now as well


SQLServerNewbie

MCITP: Database Administrator SQL Server 2005
Post #574410
Posted Tuesday, September 23, 2008 8:33 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 11, 2014 3:10 AM
Points: 1,274, Visits: 1,987
bitbucket (9/23/2008)
I would like to thank all who have commented. I have learned a little more to apply to any additional QOD that I may submit. Please note that I relied on the
Merriam-Webster Dictionary definition for the words equivalent, and same which are:

Equivalent:
equal in force, amount, or value


Same:
equal in size, shape, value, or importance —usually used with the or a demonstrative (as that, those) in all senses


The main objective as I understand the QOD is to introduce readers to new and/or little known aspects of SQL Server it is my hope that this is what this question did.

So you are admitting that the answer should be that they are the same since they are equivalent?
There's no indication that floating point number are involved (sales volumes are usually integer or even big integer) so that doesn't apply hence they will give the same values, and hence are the same.

Or have I (and many others) misunderstood?


Derek
Post #574412
Posted Tuesday, September 23, 2008 8:39 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, May 30, 2013 9:03 AM
Points: 1,921, Visits: 549
bitbucket (9/23/2008)
I would like to thank all who have commented. I have learned a little more to apply to any additional QOD that I may submit. Please note that I relied on the
Merriam-Webster Dictionary definition for the words equivalent, and same which are:

Equivalent:
equal in force, amount, or value


Same:
equal in size, shape, value, or importance —usually used with the or a demonstrative (as that, those) in all senses


The main objective as I understand the QOD is to introduce readers to new and/or little known aspects of SQL Server it is my hope that this is what this question did.


I'm still confused. 'Equivalent' and 'same' are synonyms, making them interchangeable. So, I'm still struggling to understand what criteria is being used to disqualify the 2 queries from being the same.
Post #574424
Posted Tuesday, September 23, 2008 8:44 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, January 8, 2013 7:08 AM
Points: 469, Visits: 124
Tell me otherwise, bitbucket, but I think that you have read something into the BOL article that isn't there. Nothing says that sales is any kind of non-integer datatype - just as nothing says it isn't (in fairness). Plus, unfortunately, your use of the dictionary to justify your position is just plain confusing. I commend the fact that you have introduced me to a new part of SQL, and sparked some debate and interest, but...
Post #574443
Posted Tuesday, September 23, 2008 8:48 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, January 8, 2013 7:08 AM
Points: 469, Visits: 124
... given that in the BOL article "The following statements are equivalent" suggests that in the author of the article's mind, sales is NOT a floating point data type. Otherwise, surely, the quote would be "The following statements are NOT equivalent".
Post #574452
Posted Tuesday, September 23, 2008 8:56 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: Tuesday, May 14, 2013 1:42 PM
Points: 3,487, Visits: 1,581
I'm confused as well. The question asked if the queries were the same, not if the result sets were the same. According to the link you supplied, the queries are the same. There's not enough information to determine if the result sets would be the same.

I'm not sure from your post if your suggesting that "the same" is not the same as "equivalent" or if "equivalent" is not equivalent to "the same", but I think most of us will agree that they are synonyms in this context. Either way, now were discussing semantics not SQL. Just my opinion...

Greg




Post #574473
Posted Tuesday, September 23, 2008 9:40 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 12:50 PM
Points: 2,500, Visits: 1,586
Great Question. I got it right but for the wrong reason. After the explanation I see most people's point about the same not being the same.

I always thought that 1 + 2 = 3, and that 2 + 1 = 3, so they are equivalent right? Does 1 + 2 = 2 + 1? Or are the so different as to make one wonder?

Miles...


Not all gray hairs are Dinosaurs!
Post #574554
Posted Tuesday, September 23, 2008 9:59 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 11, 2014 3:10 AM
Points: 1,274, Visits: 1,987
Miles Neale (9/23/2008)
Great Question. I got it right but for the wrong reason. After the explanation I see most people's point about the same not being the same.

I always thought that 1 + 2 = 3, and that 2 + 1 = 3, so they are equivalent right? Does 1 + 2 = 2 + 1? Or are the so different as to make one wonder?

Looked at as simple text, Query 1 (using GROUPING SETS) is not the same as Query 2 (using UNION ALL), in the same way that "1+2" is not the same as "2+1".

However, most people would assume that the QoTD was asking more than a simple text comparison, i.e. is query 1 equivalent to query 2?

The reference given says it is, since the queries given there are exactly as in the question! Hence the answer stated is wrong!


Derek
Post #574575
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse