Forum Replies Created

Viewing 15 posts - 301 through 315 (of 319 total)

  • RE: How to run an update statement??`

    I had the codes wrong...

    actually when someone did a conversion they put in 22 instead of MA ..

  • RE: How to run an update statement??`

    Hi Sean.

    Thanks.. worked perfect..

    Still a little gun shy of the update statement..

    lol

  • RE: is null???

    Hey Sean REALLY appreciate it...

    When can I attend your class!! 🙂

    Thanks

    Joe

  • RE: is null???

    OMG I think I got it!!!

    insert into @TEMPTABLE (TAG_NAME, TAG_DATA)

    select TAG_NAME = 'CUST_ALLERGIES',

    TAG_DATA = case

    CA.MEDICATION_MONIKER -- looks if NULL

    when null then 'No...

  • RE: is null???

    I think I got the logic now, but not the sytax???

    insert into @TEMPTABLE (TAG_NAME, TAG_DATA)

    select TAG_NAME = 'CUST_ALLERGIES',

    TAG_DATA =

    case CA.MEDICATION_MONIKER

    when null then 'No Allergies'

    ...

  • RE: is null???

    Ur right a BIT over my head right now ..lol

    so If I use

    select

    TAG_NAME = 'CUST_ALLERGIES',

    case CA.MEDICATION_MONIKER

    when null then 'No Allergies'

    else

    CRT.FullName + '~' + M.GENERIC_NAME

    end --you have to end your...

  • RE: is null???

    tried this.. getting a systax error??

    select

    TAG_NAME = 'CUST_ALLERGIES',

    case CA.MEDICATION_MONIKER

    when null then 'No Allergies'

    else

    CRT.FullName + '~' +...

  • RE: is null???

    Hi Sean,

    Im more of a crystal reports person, and the person who orginally wrote this ALWAYS used inner joins

    I tested the joins and kno via Crystal they r Left outer...

  • RE: is null???

    Hi..

    So I got the Nolocks and inner joins cleaned up

    insert into @TEMPTABLE (TAG_NAME, TAG_DATA)

    select TAG_NAME = 'CUST_ALLERGIES',

    TAG_DATA =CRT.FullName + '~' + M.GENERIC_NAME

    FROM MEDICATION M

    left outer JOIN CLIENT_ALLERGY CA...

  • RE: is null???

    Hi Sean,

    Im not sure on the NOLOCKS, its something I inherited and as you can tell Im new at this.. 🙂

    But your not the first person to ask...

    I think you...

  • RE: is null???

    Hi Sean,

    Thanks for the advice..

    SO I set it like:

    TAG_DATA = isnull(CRT.FullName + '~' + M.GENERIC_NAME)

    FROM MEDICATION M WITH (NOLOCK)

    INNER JOIN CLIENT_ALLERGY CA ON M.OID = CA.MEDICATION_MONIKER

    Inner join CHEMICAL_REFERENCE_TYPE CRT...

  • RE: if NULL ? ??

    So being new at SQL, I got it to work using an if null..

    SOrry Im still confused w/ @@ROWCOUNT.... more classes coming up....

    But thansk for all the help ...

    here...

  • RE: if NULL ? ??

    not sure if Im answering the ? right,

    and I stink at this for a lack of better words..

    but when I run it with data CUST_RID = ^ and wondeing if...

  • RE: if NULL ? ??

    OK so the SP has this code at the botton

    --DO NOT CHANGE BELOW THIS LINE--

    --Replaces special characters in data to prevent error when reading into HTML Forms

    UPDATE @TEMPTABLE SET TAG_DATA...

  • RE: if NULL ? ??

    Hi,

    So the logic definitly works, but my problem is the SP has many SELECTS so @@ROWCOUNT is always >0

    is there a way to evaluate just the upper select like...

Viewing 15 posts - 301 through 315 (of 319 total)