Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Accessing and changing data 2008


Accessing and changing data 2008

Author
Message
bitbucket-25253
bitbucket-25253
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5695 Visits: 25280
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
HanShi
HanShi
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3051 Visits: 3633
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 Ermm
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’! **
Jerry Hung
Jerry Hung
Right there with Babe
Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)

Group: General Forum Members
Points: 794 Visits: 1208
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
StarNamer
StarNamer
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1294 Visits: 1992
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
Tim Benninghoff
Tim Benninghoff
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1921 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.
liam.stirling
liam.stirling
SSC-Addicted
SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)

Group: General Forum Members
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...
liam.stirling
liam.stirling
SSC-Addicted
SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)SSC-Addicted (469 reputation)

Group: General Forum Members
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".
JestersGrind
JestersGrind
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3495 Visits: 1585
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



Miles Neale
Miles Neale
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2670 Visits: 1694
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!
StarNamer
StarNamer
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1294 Visits: 1992
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search