Forum Replies Created

Viewing 15 posts - 16 through 30 (of 30 total)

  • RE: Custom order in SELECT

    Erin Ramsay (3/1/2013)


    Something like this maybe?

    select letter from

    (select 'a' letter

    union

    select 'b' letter

    union

    select 'c' letter

    union

    select 'd' letter

    union

    select 'e' letter)source

    order by (case letter when 'd' then 1 when 'c' then 2...

  • RE: Exclude similar columns in a JOIN command

    Dear Sean,

    Thanks for help.

    I know how much headache I will get to find a stable solution but your suggestion is a really helpful starting point.

    I will work on it...

  • RE: Exclude similar columns in a JOIN command

    Sean Lange (3/1/2013)


    RZ52 (3/1/2013)


    Hi,

    I have three tables and the structures are :

    Table1 : [PATIENT_ID],[Name],[Age],[City],[TEST1],[TEST2]...... (the AB? are test names dynamically added to table)

    Table2 : [PATIENT_ID],[Name],[Age],[DR1],[DR2],...... (the DR? are drug names...

  • RE: A complicated situation

    Eugene Elutin (3/1/2013)


    replace:

    NULLIF(Result,1)

    with:

    CASE WHEN Result = 2 THEN Result ELSE NULL END

    Dear Eugene,

    You solved my puzzle.

    Thanks a lot.

  • RE: A complicated situation

    Eugene Elutin (2/28/2013)


    RZ52 (2/28/2013)


    Dear SQLKnitter,

    I appreciate for advice. The reason I stay with SELECT is because I use it as SP to fill a datagridview in my application.

    Thanks again

    Yeap, it's...

  • RE: A complicated situation

    Dear Eugene,

    You've completed my day.

    Thanks a lot.

  • RE: How to concatenate group of rows

    Dear Cadavre,

    It worked nice and perfect.

    Sorry if I was not very clear on explaining situation.

    Best Regards,

  • RE: How to concatenate group of rows

    Dear Jeff,

    Thanks for your advice. I am newbie so it might take time to learn how I need to present my situation but I always appreciate suggestions from seniors.

    Best...

  • RE: A complicated situation

    Dear SQLKnitter,

    I appreciate for advice. The reason I stay with SELECT is because I use it as SP to fill a datagridview in my application.

    Thanks again

  • RE: A complicated situation

    Dear Eugene,

    This is exactly what I was looking for.

    Thanks a lot.

  • RE: How to concatenate group of rows

    Dear Dadavre,

    The proposed solution works good. However, we need also to distinguish those samples that are positive but no O15? factor was detected and tag them as "Non-pathogen" (in my...

  • RE: How to concatenate group of rows

    Dear Jeff,

    The above scenario is only a simplified example. My real dataset is about the serotype profile of certain bacterial samples. So, we do some probe tests for certain factors...

  • RE: How to concatenate group of rows

    Dear Arjun,

    Thanks for guidance. With some minor modification, it works perfectly.

    Now, I have another issue, in my [Task] field I have subgroups that is indicated with a specific format like...

  • RE: How compare a list to a table

    Dear SSCarpal Tunnel,

    Thanks for the help. I will check which option give me better performance.

  • RE: How compare a list to a table

    Dear SSCrazy,

    Your solution saved me. It works perfectly and I learned about "OUTER APPLY" which I was not aware of.

    Thanks again.

Viewing 15 posts - 16 through 30 (of 30 total)