Forum Replies Created

Viewing 15 posts - 3,691 through 3,705 (of 10,144 total)

  • RE: Are the posted questions getting worse?

    wolfkillj (1/29/2014)


    I created and used my first extended events session last week, and it was great - easy and extremely helpful. I just posted about it on my blog, if...

  • RE: Need help with merge

    It's by design, Kapil. There are two steps to the update/insert - a read to determine the rows which will be affected (by the join to source) and then the...

  • RE: Referral Dates Nightmare

    jsayerweb (1/29/2014)


    Hello,

    Thankyou for the bottom solution, it seems to work well, there are just a few instances were there is still a null start date and null end date. Its...

  • RE: Comparing string with date

    Jeff Moden (1/29/2014)


    Post deleted. I made a mistake. I'll be back.

    A little history Jeff. Might save you some time.

  • RE: Referral Dates Nightmare

    Using Gail's script:

    /*

    I need to get the list of referrals, per client, in chronological order using the dates from the referralaction table.

    A allocations status will be given once a...

  • RE: Referral Dates Nightmare

    Msg 8106, Level 16, State 1, Line 5

    Table 'ChildReferrals' does not have the identity property. Cannot perform SET operation.

    Jon - I suspect you will learn as much from this exercise...

  • RE: Referral Dates Nightmare

    jsayerweb (1/29/2014)


    ...Hope that makes sense and my above code works...

    Did you test it? I was planning to work on your problem for you over lunch but the sample data script...

  • RE: How to have multiple select statements in CASE

    Where does the column [Type] come from?

  • RE: How to have multiple select statements in CASE

    sabeer.mvit (1/29/2014)


    So as per your comments, I need to use multiple If's.... But if there are more than 100 types , then having 100 if's would not be good practice...

  • RE: Query just hangs!

    Abu Dina (1/29/2014)


    ChrisM@Work (1/28/2014)


    Gail's suggestion using DENSE_RANK() is well worth a try when you get time.

    Is it?

    So what happens if I have two records with the same Organisationname but the...

  • RE: How to have multiple select statements in CASE

    Not really. CASE is used within a query. Can you post the whole query within which you want to use the CASE construct?

  • RE: Referral Dates Nightmare

    jsayerweb (1/29/2014)


    Yes?!

    Cheers

    J

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near ':'.

    Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near ':'.

    Msg 102, Level 15, State 1, Line 3

    Incorrect syntax...

  • RE: Referral Dates Nightmare

    Did you test it before posting?

  • RE: Referral Dates Nightmare

    Hi Jon

    Anyone wishing to test queries against your tables would first have to convert this:

    Referral Table:

    CLI_PER_ID,REF_ID,REF_REFERRED_BY,REF_REFERRER_ROLE,REF_SOURCE_TEAM,REF_REFERRED_TO,REF_RECEIVED_BY,REF_REFERRED_ON,REF_RECEIVED_ON,REF_RECEIVED_AT,REF_REFERRED_AT,REF_TO_PER_ID,REF_PRIORITY,REF_METHOD,REF_TREAT_REASON,REF_REASON,REF_STATUS,REF_CLI_AWARE,REF_FAM_AWARE,REF_ANONYMOUS,REF_CREATED_ON,REF_CREATED_AT,REF_CREATED_BY,REF_AMENDED_ON,REF_AMENDED_AT,REF_AMENDED_BY,REF_ACCESS_KEY,REF_PARENT_ID,REF_OWNER_TEM_ID,StartDate,EndDate,REF_TYPE

    27429,621,NULL,1,NULL,T0286 ,NULL,00:00.0,00:00.0,NULL,8.26,NULL,NULL,LACMIG ,60,*,CLO ,0,0,0,31:10.0,18.31,1,45:48.0,11.45,1,U ,NULL,T0286 ,00:00.0,00:00.0,MIG

    27429,622,NULL,79,NULL,T0286 ,NULL,00:00.0,00:00.0,NULL,13.18,NULL,NULL,LACMIG ,G2 ,*,CLO ,0,0,0,31:10.0,18.31,1,45:48.0,11.45,1,U ,NULL,T0286 ,00:00.0,00:00.0,MIG

    27429,624,NULL,1,NULL,T0064 ,NULL,00:00.0,00:00.0,NULL,15.33,NULL,NULL,LACMIG...

  • RE: How to have multiple select statements in CASE

    Can you show the context in which this would be used?

Viewing 15 posts - 3,691 through 3,705 (of 10,144 total)