Forum Replies Created

Viewing 15 posts - 54,106 through 54,120 (of 59,089 total)

  • RE: Does aliased table cause a problem?

    Maybe I'm going blind... but I don't see anything obviously wrong in your query code... heh, well except for the fact that it's embedded SQL 😉

    With that in mind, you...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Does aliased table cause a problem?

    I'm thinking that if you want us to fix your car, ya gotta let us look under the hood... post both versions of the code and the precise error message.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: How can I group these codes and total them?

    Or, better yet... best of both worlds

    select sum(CorporateRevenue07.CommissionableRevenue) as totals,

    CorporateRevenue07.Code

    from CorporateRevenue07

    where CorporateRevenue07.ProcessDate = '6/1/07'

    and CorporateRevenue07.CommissionableRevenue > 0

    and CorporateRevenue07.Code like 'WCSSHORE%'

    AND CorporateRevenue07.RevDate = '1/1/07'

    and CorporateRevenue07.Gate = 'WW'

    and CorporateRevenue07.RevType = 'TB'

    group by...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: How can I group these codes and total them?

    select sum(CorporateRevenue07.CommissionableRevenue) as totals,

    LEFT(CorporateRevenue07.Code,8) AS Code

    from CorporateRevenue07

    where CorporateRevenue07.ProcessDate = '6/1/07'

    and CorporateRevenue07.CommissionableRevenue > 0

    and CorporateRevenue07.Code like 'WCSSHORE%'

    AND CorporateRevenue07.RevDate = '1/1/07'

    and CorporateRevenue07.Gate = 'WW'

    and CorporateRevenue07.RevType = 'TB'

    group by LEFT(CorporateRevenue07.Code,8)

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Query Help

    Is it possible to say, "Starting at the right of the DestHost field, go left until the 2nd dot and drop that dot and everything to the left of it....

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Pivot a list of dates into date intervals

    The keyword is contiguous.

    Give me the start and end date of all contigous date sequences.

    Actually, Michael... according to that bit of information, I don't think you give a rat's...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Urgent! - How to extract number from a string

    Matt is correct... he's beat the snare right off that drum... and guess what? He's right! Matt and I have done a huge amout of testing and using...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: is there any difference between != and <>

    Took a while to get the code realigned correctly after the copy/paste operation

    Matt,

    Reformatting code that you've copied from those "Code" windows is actually pretty easy (although I wish they'd just...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Concatenation of rows in function

    Actually, you can get to the precise post Matt is talking about by clicking on the following... not need to hunt pages...

    http://www.sqlservercentral.com/Forums/Topic419472-65-2.aspx#bm422799

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Dynamically create cursor

    Not sure, but I think dynamically creating a cursor is like dynamically creating a temp table... you may get it to work, but it'll likely be out of scope just...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: is there any difference between != and <>

    Sorry... must still have the "ranger eye's" going on from lack of sleep the other day... I just say the results you posted for the run.

    Thanks for fixing my boo-boo....

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: is there any difference between != and <>

    ==============================================================================

    The XML path() method

    ------------------------------------------------------------------------------

    00:00:08:423 Duration (hh:mi:ss:mmm)

    ==============================================================================

    Now... THAT's impressive! It reduced the processing time by almost 2/3rds. Rare thing when you find a gem like that. Thanks!

    EDIT: ...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: is there any difference between != and <>

    No noticeable difference in processing time.

    You mean on the dynamic SQL by itself or the whole Phone Test #1?

    Thanks for the great tip (we call them "oolies" in the US...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: is there any difference between != and <>

    Oh, I will add in an additional challenge if you two feel like it.

    Take data of the following form, with a lot, lot more data (say 100 000 rows and...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: is there any difference between != and <>

    Bottom of the page. It's actually a CSQ, but it seems to run like the wind with proper indexing (8 seconds re-concatenating the 3.54M phone numbers I extracted previously). Those...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 54,106 through 54,120 (of 59,089 total)