Viewing 15 posts - 11,416 through 11,430 (of 14,953 total)
Unless the relationships between the table are one-to-one, joining tables and then running aggregates will usually give different results than the same aggregates run on each table separately. That's...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 22, 2009 at 8:56 am
The join is between whatever tables are in the join math.
For example, the second join is between TBL_Hearing and tbl_DiscCase, because those are the two that are mentioned in the...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 22, 2009 at 8:50 am
That's definitely a CPU Affinity issue. Check your settings on that.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 22, 2009 at 8:02 am
GilaMonster (1/22/2009)
Why do you have denormalised tables? What's the reason for putting lists into a single column instead of into a child...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 22, 2009 at 8:01 am
You can set SQL Server to automatically start when the server starts. Usually a good idea to do that. You can do that from the services menu in...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 22, 2009 at 7:24 am
Aha! It's losing the first bracket in the query, per the print results. Try changing that to "[[", see if it gets what you need.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 22, 2009 at 7:20 am
Good article. Thanks for writing it.
Having used various versions of Intellisense with SQL, I have to say I usually don't like it. Too many times, I've had the...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 22, 2009 at 6:58 am
In Management Studio, please run "select @@version". That's where you get the version data on SQL Server.
There may be a problem with connecting Access to a later version of...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 21, 2009 at 3:03 pm
Test both. Set IO and time stats on, and run each a few times, to get average run-time.
In case you don't know:
set statistics io on;
set statistics time...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 21, 2009 at 12:53 pm
Lynn Pettis (1/21/2009)
INSERT INTO #grapes
(win_id, priority)
SELECT '19820865478765','1' UNION ALL
SELECT '19820835478765','5' UNION ALL
SELECT '19820895478765','4' UNION ALL
SELECT '19820865438765','2' UNION ALL
SELECT '19820865478765','1'...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 21, 2009 at 12:48 pm
Did I miss the execution plans or are they not posted?
Also, I can't see where you have any difference in the From clause of the two selects. Does one...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 21, 2009 at 11:42 am
Gabe (1/21/2009)
GSquared (1/21/2009)
The part I added is called a correlated subquery, because part of it (the Where clause) references one of the tables in the outer query.
Does that get you...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 21, 2009 at 11:38 am
What it'll do with multiple rows is nothing compared to what it'll do if there are multiple simultaneous inserts. That's one of the reasons I recommend against using a...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 21, 2009 at 11:23 am
bitbucket (1/21/2009)
Gsquared
Paul Nielsen's "SQL 2000 Bible"
Just hit Amazon and there are SQL 2005 Bible and SQL 2008 Bible (Pre-order due on Jun 22, 2009) by Paul Nielsen each priced at...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 21, 2009 at 11:21 am
Try something like this:
SELECT nl.nodeId, nl.nodeTitle, nl.nodeText, ql.questionText,
qc.choiceText, qc.patientResponse, nl.mediaID,
(select count(*)
FROM nodeList nl2
LEFT JOIN questionList ql ON ql.questionId = nl2.questionId
LEFT JOIN questionChoices qc ON qc.questionId = nl2.questionId
WHERE caseID =...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 21, 2009 at 11:20 am
Viewing 15 posts - 11,416 through 11,430 (of 14,953 total)