Forum Replies Created

Viewing 15 posts - 376 through 390 (of 921 total)

  • RE: Having Trouble with EXISTS

    You need to correlate the existence subquery, e.g.

    
    
    ...
    AND EXISTS (SELECT *
    FROM A04Code
    ...



    --Jonathan

  • RE: Remove alpha characters

    quote:


    For long strings with more than a small percentage of characters that must be stripped, the overhead of the PATINDEX and STUFF...



    --Jonathan

  • RE: default date format

    quote:


    Quick brainteaser for our beginning DBA's: what's the quickest method to strip out the time from a DATETIME field (returning only...



    --Jonathan

  • RE: Update Row with Combination of Values

    This should be easy to do. It's essentially just three statements.

    
    
    UPDATE TimeOff
    SET Code = 50
    WHERE Code = 45
    AND NOT EXISTS
    (SELECT *
    FROM TimeOff t
    WHERE...



    --Jonathan

  • RE: Happy anniversary

    Congrats, Frank! Have a "real" Budweiser on me!

    quote:


    Hey, I expanded my vocabulary today with two new ones.

    That's too much, I need...



    --Jonathan

  • RE: How to add a carriage return

    If I understand your need, this is difficult in T-SQL but easy in any programmable front-end. If you can't manage this on the front-end, then perhaps just using some...



    --Jonathan

  • RE: Dynamically determining a Top n for Top keyword

    quote:


    Forget it, I had a typo when searching my online dictionary

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de


    Just...



    --Jonathan

  • RE: Alternative to cursor

    quote:


    Jonathan,

    I believe yours will not select anything or the wrong results.

    Correction, it will if cust is the same for each account.




    --Jonathan

  • RE: Dynamically determining a Top n for Top keyword

    quote:


    Thanks a lot Jonathan ! The script helps me to solve the problem. But if I want use the top 10 drug...



    --Jonathan

  • RE: Alternative to cursor

    
    
    SELECT c.Class, c.Account, c.Cust, c.Doc_Type
    FROM Documents c LEFT JOIN Documents o ON o.Account = c.Account AND o.Doc_Type IN ('ORIG1','ORIG2')
    WHERE c.Doc_Type IN ('COPY1','COPY2')
    AND o.Account IS NULL

    --Jonathan



    --Jonathan

  • Viewing 15 posts - 376 through 390 (of 921 total)