Forum Replies Created

Viewing 15 posts - 11,896 through 11,910 (of 15,381 total)

  • RE: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

    With well over 500 points I find it amazing you would post this. There is no ddl for any of the tables, there are multiple additional procs being called and...

  • RE: ascending numbers

    SQL Kiwi (5/22/2012)


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

  • RE: Case an alias column

    boehnc (5/22/2012)


    thank you for the code..I'll give that a try. Do you have better suggestion for the sum? I'm trying to add all the department code charges, and if there...

  • RE: ascending numbers

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

  • RE: trouble shooting data with temp

    SQL Kiwi (5/22/2012)


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

  • RE: Union produces multiple rows of data that should be put together

    That is what UNION does. It will combine multiple queries into a single resultset. I have a feeling you want to look at crosstab or pivots.

    http://www.sqlservercentral.com/articles/T-SQL/63681/%5B/url%5D

  • RE: trouble shooting data with temp

    chalbert (5/22/2012)


    Where should datediff go?

    Like this???

    Select

    dbo.b_ENROLLMENT.MEMBER_DOB_DATE,

    dbo.b_ENROLLMENT.EFF_DATE,

    dbo.b_ENROLLMENT.MED_ID,

    dbo.b_ENROLLMENT.PLAN_CODE as aid,

    dbo.p_DMAS_MEDICAL_TRANSITION.recip as recipno,

    dbo.p_DMAS_MEDICAL_TRANSITION.SEX as sex,

    CASE WHEN (dbo.p_DMAS_MEDICAL_TRANSITION.SEX)='M' THEN 1

    WHEN (dbo.p_DMAS_MEDICAL_TRANSITION.SEX)='F' THEN 0

    END AS MALE,

    case

    when (dbo.b_ENROLLMENT.PLAN_CODE)='450' or (dbo.b_ENROLLMENT.PLAN_CODE)='451' or...

  • RE: trouble shooting data with temp

    chalbert (5/22/2012)


    Thanks...but I keep getting the errors:

    Msg 207, Level 16, State 1, Line 22

    Invalid column name 'aid'.

    Msg 207, Level 16, State 1, Line 22

    Invalid column name 'aid'.

    Msg 207, Level 16,...

  • RE: trouble shooting data with temp

    chalbert (5/22/2012)


    The following data keeps coming up with the error that there is an issue around the as in the alias for age...any thoughts?

    Select

    dbo.b_ENROLLMENT.MEMBER_DOB_DATE,

    dbo.b_ENROLLMENT.EFF_DATE,

    dbo.b_ENROLLMENT.MED_ID,

    dbo.b_ENROLLMENT.PLAN_CODE as aid,

    dbo.p_DMAS_MEDICAL_TRANSITION.recip as recipno,

    dbo.p_DMAS_MEDICAL_TRANSITION.SEX...

  • RE: ascending numbers

    Confusing Queries (5/22/2012)


    SQLKnowItAll (5/22/2012)


    Very nice! Now the question plaguing me is... Why on earth would we want to do this?!

    To implement Kaprekar Series...

    With the amount of looping and such I...

  • RE: Column naming convention

    I am a firm believer that any column should have a name that identifies it clearly and should not change between tables. Column names changing table to table is complete...

  • RE: Handle white space/empty column ?

    toddasd (5/22/2012)


    Sean Lange (5/21/2012)


    toddasd (5/21/2012)


    If it is already a space why change it to a space? Wouldn't this get everything:

    Select ISNULL(Item, ' ') from ITEMS

    Or are you trying to...

  • RE: Updating Comma Delimited Field

    What you have is the beginning of your worst nightmare. The challenges you are facing is the reason you shouldn't store more than 1 value in a single column. You...

  • RE: SQL programming comparing list to list

    Siten0308 (5/21/2012)


    thanks again :).... where do i mark as answered to give points or whatever?

    I do however accept Guinness. 😛

  • RE: SQL programming comparing list to list

    Siten0308 (5/21/2012)


    thanks again :).... where do i mark as answered to give points or whatever?

    Thanks for the props but we don't roll like that around here. It could be that...

Viewing 15 posts - 11,896 through 11,910 (of 15,381 total)