Forum Replies Created

Viewing 15 posts - 166 through 180 (of 859 total)

  • RE: Which way is better? To join or not to join or does it matter?

    GilaMonster (10/25/2012)


    Correlated subqueries do not run per row of the outer query (unless triangular joins or top 1 ... order by).

    Correlated subqueries are not usually more expensive than joins, they...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Retrieve data between 2 '.'

    so i went for the SQL CLR just to see if i could get it to work (been on a learning kick right now so im going with it) and...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Which way is better? To join or not to join or does it matter?

    Want a cool sig (10/25/2012)


    I'm writing a script that will probably join a bit more then 20 tables.

    It's my understanding that joins are costly.

    Would it cost less to write certain...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: The client was unable to reuse a session with SPID 799, which had been reset for connection pooling.

    in your error log is the event id 18056? If so and its not causing any issues you can preaty much ignore it (im digging through my bookmarks now...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Has anyone seen a naming convention like this?

    TheGreenShepherd (10/25/2012)


    I just recently started work at a new location and, in getting familiar with their systems, I noticed that they are using a naming convention that I've never seen...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Max and Min Date problems

    Are you getting any error messages? If all you are running is Select [Job Ref], MAX([Booked Date]),MIN([Booked Date])

    you should be getting an error. If so id like...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: SQL courses

    if your just getting started into sql i would suggest "Essential SQL on SQL Server 2008" by Sikha Bagui and Richard Earp (Amazon Link). i knew quite alot but...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Table naming...

    IgorMi (10/25/2012)


    PiMané (10/25/2012)


    Hi,

    I was trying to get a "rule" for table naming but it's kind of hard to do it since every case is a casa...

    You can have a table...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Query-Identifying populations

    DiverKas (10/25/2012)


    boehnc (10/25/2012)


    I have the following table and fields:

    Table: tbl.transactions T

    Fields: T.visitid, T.diagnosiscode

    It looks like this:

    visitid, diagnosiscode

    1111,34.0

    1111,68.0

    1111,34.2

    1112,34.3

    1112,45.0

    1112,23.4

    I need to identify the individuals that have CHF or pneumonia for each visitID....


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: how to show single column value (separated by ;) as multiple columns otherwise null

    Since the OP seems to have disappeared ill post the code.

    ;WITH data AS (

    SELECT 101 AS StudentID, 'EJB;C++;PERL' AS Subject UNION ALL

    SELECT 102,'Dotnet' UNION ALL

    SELECT 103,'Java' UNION ALL

    SELECT 104,'Oracle;Java;Sql' UNION...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Why won't this query return data?

    Are you talking about the following not returning any data?

    select @datastring2 = @datastring2 + substring(@datastring,N,1)

    from Tally

    where n <=len(@datastring)

    and substring(@datastring,N,1) <> ','

    its because you are actually assigning the output of...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Need to filter large CTE in Join or where clause

    You have something close to solvable. can you post DDL, Sample data, and the desired output for your tables stripped down to resemble the problem. That will help allot...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: How can I sort this?

    sku370870 (10/24/2012)


    Thanks very much - as you say, that does the job.

    Worst case will be maybe 500 rows - so I'm sure performance won't be an issue.

    Thanks again.

    this is sql...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: How can I sort this?

    sku370870 (10/24/2012)


    Thanks for the input so far - as you say, the code so far does not produce the right order.

    I've been playing with an awful mess of cursors and...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: How can I sort this?

    T_Dot_Geek (10/24/2012)


    capnhector (10/24/2012)


    T_Dot_Geek (10/24/2012)


    Create a new calculated SortID column and add it in order by clause

    SELECT TaskID, BaseTaskID, SortID = Case When BaseTaskID = 0 THEN TaskID ELSE BaseTaskID END

    order...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

Viewing 15 posts - 166 through 180 (of 859 total)