Forum Replies Created

Viewing 15 posts - 1,621 through 1,635 (of 3,957 total)

  • RE: How to convert my cursor tsql to set based

    Your sample data looks good. But the results set is simply the sample data directly SELECTed out of the table you provided.

    You need to give us consumable sample data...

  • RE: N' annotation

    Steven Willis (7/31/2013)


    If you ever use dynamic SQL using the built-in system function 'sp_executeSQL' and try to use an OUTPUT parameter the function will not work unless you explicitly append...

  • RE: How to convert my cursor tsql to set based

    Sounds like you have what is called an adjacency list with people/houses and you may be able to resolve this with a recursive CTE (or perhaps not).

    Two questions:

    1. Do you...

  • RE: N' annotation

    For display purposes these 2 results would be identical (except of course for the specific words):

    SELECT 'THIS IS A VARCHAR STRING', N'THIS IS AN NVARCHAR STRING';

    There may be a slight...

  • RE: Create sum closest to an integer

    Sean Lange (7/31/2013)


    dwain.c (7/30/2013)


    I love SQL bin-packing problems! Hate to disagree with you Sean but they don't need to be overly complicated.

    Before I suggest a solution, shouldn't the answer...

  • RE: help with incrementing

    Here's another approach for your dissection table:

    with SCC_CTE(VENDID, VENDTYPE)

    as (select 'ABC', 1 union all

    select 'ABC', 0 union all

    select 'ABC', 0 union all

    select 'XYZ', 1 union all

    select 'XYZ', 0 union all

    select...

  • RE: Output query result to excel sheet

    Rakesh.Chaudhary (7/30/2013)


    Hi,

    I want to put results into excel from Sql script , In results it is having three different result sets returned

    Like as below.

    Select * from...

  • RE: Create sum closest to an integer

    Here's an example that processes 100 random integers up to 3-tuples with target value of 100. It takes less than 3 seconds to run on my box.

    DECLARE @t TABLE...

  • RE: Create sum closest to an integer

    I love SQL bin-packing problems! Hate to disagree with you Sean but they don't need to be overly complicated.

    Before I suggest a solution, shouldn't the answer be 4, 6...

  • RE: When NULL IS NOT NULL

    Just wanted you all to know I appreciate the research you've done and I haven't absconded from this thread. Merely lurking until I have something of value to add.

  • RE: Analytical function for my Q

    mario17 (7/29/2013)


    Dwain, is this your trophy fish?

    Mario

    That is my 45kg Mekong Catfish! Not a record by any means (they grow well over 100kg) but a record for me.

    And you're...

  • RE: Analytical function for my Q

    Steven Willis (7/29/2013)


    dwain.c (7/29/2013)


    Steven Willis (7/29/2013)


    Dwain is a master of minimilism...

    I like it. I'm trying to think of a way to incorporate it in my signature.

    Reminds me of the...

  • RE: Analytical function for my Q

    Steven Willis (7/29/2013)


    Dwain is a master of minimilism...

    I like it. I'm trying to think of a way to incorporate it in my signature.

    Reminds me of the quote ChrisM has...

  • RE: Analytical function for my Q

    Your expected results are off for the <30 days column (can't be less of a percent than <20 days), but something like this should do it:

    SELECT datein

    ...

  • RE: Need T-SQL Query Help- Urgent

    ChrisM@Work (7/29/2013)


    Thanks for the very generous feedback, Mr Kapsicum.

    If you're interested in how the method works, here's an excellent article by Dwain Camps[/url].

    Oh my! The word is out.

    And here...

Viewing 15 posts - 1,621 through 1,635 (of 3,957 total)