Forum Replies Created

Viewing 15 posts - 11,416 through 11,430 (of 14,953 total)

  • RE: Query giving me different results

    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...

  • RE: Outer Join Syntax Clarification Needed

    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...

  • RE: W2K3 EE German x64 and SQL Server 2005 Standard x64 as single Instance in an Cluster

    That's definitely a CPU Affinity issue. Check your settings on that.

  • RE: Correct use of @variables and uniqueidentifiers

    GilaMonster (1/22/2009)


    So cast the uniqueidentifier to a varchar before concatenating.

    Why do you have denormalised tables? What's the reason for putting lists into a single column instead of into a child...

  • RE: Where to start

    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...

  • RE: Best performance Row by row loop (SQL2K)

    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.

  • RE: SQL Server 2008 T-SQL Enhancements Part - I

    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...

  • RE: SQL Server Migration Assistant Wizard for ACCESS - can't connect to SQL Server

    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...

  • RE: Co-worker Dispute

    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...

  • RE: Stumbling on a SQL query - Help!!

    Lynn Pettis (1/21/2009)


    You also have a problem with the following data.

    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'...

  • RE: Partitioned views

    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...

  • RE: Get count of each ID in query

    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...

  • RE: [newbie]

    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...

  • RE: Where to start

    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...

  • RE: Get count of each ID in query

    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 =...

Viewing 15 posts - 11,416 through 11,430 (of 14,953 total)