Forum Replies Created

Viewing 15 posts - 586 through 600 (of 8,416 total)

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    L' Eomot Inversé (5/22/2012)


    edit: Essentially I agree with Paul's comments. However I recognise (as I am sure he does) that there are DBAs out there who take it as...

  • RE: ascending numbers

    Sean Lange (5/22/2012)


    I still say the Kaprekar series is entirely too much looping for t-sql. It can be done but you will basically have to add some form of recursion...

  • RE: ascending numbers

    I would probably implement this in a SQLCLR scalar function, but this is another option for T-SQL:

    SELECT

    REPLICATE('0', LEN(f.string) - LEN(REPLACE(f.string, '0', ''))) +

    ...

  • RE: Are the posted questions getting worse?

    WayneS (5/22/2012)


    Has anyone heard from Gianluca since the earthquake in northern Italy? I think he's up in that area, and just want to make sure that he's okay.

    His last tweet...

  • RE: Are the posted questions getting worse?

    Stefan Krzywicki (5/22/2012)


    Lynn Pettis (5/22/2012)


    If people would just format their code they could figure out some of their own problems. Geez.

    Many should format it all at once, like with...

  • RE: trouble shooting data with temp

    Sean Lange (5/22/2012)


    I wasn't even going to mention that Paul, there look to be so many other possible issues with this.

    You both make very reasonable points there :laugh:

  • RE: trouble shooting data with temp

    chalbert's code


    DATEDIFF(YY,dbo.b_ENROLLMENT.MEMBER_DOB_DATE,GETDATE()) as age

    This doesn't compute someone's age. It needs a formula like:

    Age =

    CASE

    WHEN DATEPART(DAY, dbo.b_ENROLLMENT.MEMBER_DOB_DATE) > DATEPART(DAY, GETDATE())

    ...

  • RE: Table query

    Beginner2012 (5/22/2012)


    Is it possible to make this dynamic, because I do not know how many different codes I have?

    Yes, but you don't want to do it in T-SQL code,...

  • RE: trouble shooting data with temp

    SQLKnowItAll (5/22/2012)


    So this part: "DATEDIFF(YY,dbo.b_ENROLLMENT.MEMBER_DOB_DATE,GETDATE( )) as age,temp.PLAN_CODE)temp" is misplaced, and I'm not really sure where it is supposed to go.

    I had the same problem:

  • RE: Table query

    Beginner2012 (5/22/2012)


    I'm using SSRS..Any clue how to perform such transpose in SSRS?

    Now you tell us :laugh:

  • RE: Table query

    The is one way to implement a pivot with totals:

    -- Sample table

    DECLARE @data AS TABLE

    (

    Code tinyint NOT NULL CHECK...

  • RE: Updating Comma Delimited Field

    umar.memon (5/22/2012)


    I have a table in which there are comma delimited fields...

    You don't say whether this design is yours or not, but if you have the option of changing it,...

  • RE: Select Statement

    archie flockhart (5/22/2012)


    But to reply to Paul's direct question and to your list of possible results above: if I could choose, I'd return FLOAT data.

    Fair enough, that's an arguably good...

  • RE: Too much space for each row

    michael vessey (5/22/2012)


    SQL Kiwi (5/22/2012)


    michael vessey (5/22/2012)


    when you perform deletes on a heap the space is not reclaimed.

    Unless a table lock is taken (and/or specified).

    ah yes - i forgot to...

  • RE: Select Statement

    Hugo Kornelis (5/22/2012)


    Good question (though a bit old - I think we've had lots of questions about this subject already). But not a good explanation.

    There is no data type conversion....

Viewing 15 posts - 586 through 600 (of 8,416 total)