Forum Replies Created

Viewing 15 posts - 19,651 through 19,665 (of 59,072 total)

  • RE: include source feature

    sgmunson (9/4/2015)


    mar.ko (9/2/2015)


    I need to use the same SQL source code in more than one stored proc.

    Is there a way to -include mysql.sql or something like that ?

    How does everyone...

    --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: Save query results directly using variables and date/time

    Luis Cazares (9/2/2015)


    You also need to be sure about the server name you're using.

    Nicely done, Luis.

    Just a tip... if it all occurs on the server itself, you don't need 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: Save query results directly using variables and date/time

    Grant Fritchey (9/2/2015)


    I would focus on using PowerShell. You can make the call to the procedure, capture the output to file. It's the most direct mechanism available. You'll have maximum...

    --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: Need Windowed Partitioning Help

    Want a cool Sig (9/4/2015)


    Hi Luis, I've never seen this before and I don't see it in the online documentation... how does it work? I always thought you needed...

    --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: view creation using xml column on linked/distributed server

    The other have told you how to parse it. That's good because I just want to rant a bit and I know none of it is your fault. ...

    --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: First Occurance of the string from text

    If I understand what you're looking for, it's actually pretty easy. Use a "not" pattern to exclude BCD.

    DECLARE @Text1 VARCHAR(8000);

    SELECT @Text1 = 'ABNAGENDRACSURENDRADJITHENDRAXNARENDRABVEERNDARAXDRMNDRAXRVINDRABNAGENDRACSURENDRADJITHEN';

    -- ...

    --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: Create dates right on the hour interval-best technique

    mar.ko (9/4/2015)


    Sorry guys, my bad....definitely having a bad day.

    And DateAdd is probably efficient....as whenever strings are involved, the conversion is usually costly.

    Lowell's solution is very slick and efficient.

    Sean's solution is...

    --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: Can't release space of temdb

    Eric M Russell (9/4/2015)


    Jeff Moden (9/4/2015)


    Alvin Ramard (9/4/2015)


    Jeff Moden (9/3/2015)


    sriponraj (9/3/2015)


    Check the connection for temp db by using sp_who2 active. Kill all the connection related to temp db and try...

    --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: Create dates right on the hour interval-best technique

    mar.ko (9/4/2015)


    Sean Lange (9/4/2015)


    mar.ko (9/4/2015)


    I tried this:

    SELECT Convert(smalldatetime,Round(Convert(float,(dbo.fnDateOnly(getDate())))+16.0000000/24.0000000,6))

    Result: 2015-09-04 16:00:00

    It works (FnDateOnly strips the time).

    Is there a more efficient way ?

    What are you trying to do? And what is fnDateOnly?

    RTFM:...

    --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 Problem Solver

    Eric M Russell (9/4/2015)


    Andrew_Steitz (9/4/2015)


    Ed Wagner (9/3/2015)


    Jeff Moden (9/3/2015)


    When I was the Director of MIS for a small but nationwide telephone company, someone asked me about my habit of hiring...

    --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: Partition switching when you can have old data

    kyagi.jo (9/4/2015)


    Hi,

    That's fine, it makes sense, but my exact case, I view it as more like if the initial partition is A, then I want to partition switch, but load...

    --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: Can't release space of temdb

    Alvin Ramard (9/4/2015)


    Jeff Moden (9/3/2015)


    sriponraj (9/3/2015)


    Check the connection for temp db by using sp_who2 active. Kill all the connection related to temp db and try to shrink..

    So, if the run...

    --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: Creating 15000 partitions

    shamshad.ali (9/3/2015)


    I have an assignment on this and prepare a presentation for this task in few days. Please do not forget your post on this. I need to resolve 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: Slow site

    @robert.chipperfield,

    Praise and kudos to you and the team, again. The site has been absolutely awesome and better than it has been for longer than we thought. That hardware/cable...

    --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 Backups

    jasona.work (8/28/2015)


    mike 57299 (8/27/2015)


    Thank you for the info.

    In your opinion, which is better - full every night or full once a week and differentials?

    Mike

    Short answer, it depends.

    Long answer,...

    --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 - 19,651 through 19,665 (of 59,072 total)