Forum Replies Created

Viewing 15 posts - 37,501 through 37,515 (of 59,098 total)

  • RE: SQL formula calc challenge

    Actually, I do have another question...

    You seem to have very neatly solved the problem in the .xls file. Your goal is (in your words) to chart the output. ...

    --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: SQL formula calc challenge

    First of all, very well done on the data and the loader code you provided. You just can't ask for much better than that.

    My only questions would be...

    1. ...

    --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: Avoid cursor....

    NewBeeSQL (7/25/2010)


    No luck with your code..can you please generate the code which was mentioned in my first mail with your logic...

    This is one of those places where a cursor isn't...

    --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: Avoid cursor....

    Adiga (7/25/2010)


    You can create a stored procedure for this code and use sp_MSforeachdb to execute it against each database.

    Example:

    EXEC SP_MSFOREACHDB @COMMAND1 ='SELECT DB_NAME(),DATABASEPROPERTYEX([?],'IsAutoClose''

    That doesn't actually avoid a cursor. MSForEachDB...

    --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: MDOP

    Tara-1044200 (7/26/2010)


    I agree with you but i am cocnered about the perofrmance if i drop to 6 as the other 2 cpu's will be idle unless some one queries 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: Many DeadLocks

    GilaMonster (7/26/2010)


    From what I've heard, deadlocks are 'expected' on sharepoint when running the search crawl. They can be ignored as the search will retry the queries. (this is per the...

    --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: 8,000 charachter limit

    8000 characters has never been a limit for code. ie... EXEC (@a+@b+@c.... etc).

    What are you using to import your data with because there's no 8k limit on imports either....

    --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: ISNUMERIC Issue

    Michael Valentine Jones (7/26/2010)


    It would by handy if SQL Server had an enhanced IsNumeric function that you could pass a specific target data type to, but that's the way 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: Increment a field starting with the same number everytime.

    J-F Bergeron (7/26/2010)


    Ken@Work (7/26/2010)


    The RowNumber() approach looks nice.

    Is that a Server 7 command? I'm having trouble with it.

    Sadly, no, it's a sql server 2005 function. Sorry to have mislead...

    --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: The same day(1,2,3..31) of every month.

    Eugene Elutin (7/26/2010)


    Jeff Moden (7/26/2010)


    asiaindian (7/26/2010)


    Add a month to the startdate

    declare @StartDate date

    set @StartDate = '01-31-2010''

    select DATEADD(mm, 1, @StartDate)

    Repeat above code through any number of frequencies. Hope this helps.

    Ok.... 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: The same day(1,2,3..31) of every month.

    asiaindian (7/26/2010)


    Add a month to the startdate

    declare @StartDate date

    set @StartDate = '01-31-2010''

    select DATEADD(mm, 1, @StartDate)

    Repeat above code through any number of frequencies. Hope this helps.

    Ok.... you have 100 frequencies... now...

    --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: Sub query expressions vs. Joins.

    Gianluca Sartori (7/26/2010)


    Jeff Moden (7/26/2010)


    Gianluca Sartori (7/26/2010)


    A minor note on the Oracle thing: it used to be completely rule-based, but now it's entirely cost-based. Starting from version 10g the rule-based...

    --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: summing up the previous row values up to date level

    jprabha.d (7/24/2010)


    Thanks For the Solution i used Running value Function that is in SSRS,

    A wise choice... how is it in the area of performance?

    --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: Sub query expressions vs. Joins.

    Gianluca Sartori (7/26/2010)


    A minor note on the Oracle thing: it used to be completely rule-based, but now it's entirely cost-based. Starting from version 10g the rule-based optimizer is no longer...

    --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: Sub query expressions vs. Joins.

    cmapowers (7/25/2010)


    This seems to be a correlated sub-query. Does this apply to non correlated sub-query?

    All non correlated sub-queries break down to being an inline view whether they're in the...

    --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 - 37,501 through 37,515 (of 59,098 total)