Forum Replies Created

Viewing 15 posts - 50,791 through 50,805 (of 59,091 total)

  • RE: How to import data from a CSV file?

    Yes there is... you will need to build a BCP Format File, but it's worth it for the sheer speed of Bulk Insert...

    The format file would look something like this...

    8.0

    4

    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: Parsing a cell into multiple rows

    Hi Bill,

    I'm a little confused by the data you've posted. Take a look at the URL I carry in my signature line... providing data and table info in that...

    --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: cursor through user databases the SEQUEL

    Simon_L (5/1/2008)


    Jeff Moden (5/1/2008)


    Ok... thanks... just trying to figure it all out... I think that's the last piece. I'll see what I can do tonight.

    thanks Jeff appreciated 🙂

    Sorry, Simon......

    --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 Server Project

    Not with 60 points in 79 visits, you haven'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: Export SQL unique format

    Sorry, my mistake... you don't need a CASE at all...

    DECLARE @DemoTable TABLE (Amount VARCHAR(15))

    INSERT INTO @DemoTable (Amount)

    SELECT '$102.50' UNION ALL

    SELECT '-$57.75'

    SELECT REPLACE(STR(ABS(CAST(Amount AS MONEY)*100.0),8),' ','0')

    ...

    --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: Export SQL unique format

    Don't need a case statement to figure the zero's...

    DECLARE @DemoTable TABLE (Amount VARCHAR(15))

    INSERT INTO @DemoTable (Amount)

    SELECT '$102.50' UNION ALL

    SELECT '-$57.75'

    SELECT REPLACE(STR(ABS(CAST(Amount AS MONEY)*100.0),8),' ','0')

    ...

    --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 Server Project

    You want projects to practice on? Why go anywhere else... stay on this forum and start answering questions. You won't find a better or more diverse set of...

    --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: Last time when did the SP run

    So, turn it on... end of proc trace takes no overhead and beats the heck out of modifying 300+ procs 🙂

    --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 T-SQL Quiz

    Matt Miller (5/2/2008)


    Grant Fritchey (5/2/2008)


    How did you know what I had planned for the week-end... 😀

    I have to ask though, what's drowning breath exercise? While we do incorporate a lot...

    --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 T-SQL Quiz

    DFalso, if you get hit by a bus tomorrow and your boss can't figure out your code, then you're proving exactly what I said... your code is not production quality...

    --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: Row-By-Row Processing Without Cursor

    poornima.s_pdi (5/1/2008)


    Hi Jeff,

    Thanks a lot for ur reply.I learnt more from ur sites.very good snd useful forum...

    Thank you for the feed back, Poornima... are you all set 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: Row-By-Row Processing Without Cursor

    Funny, they work fine for me... they take me right to the post I wanted.

    --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: Add a temp unique ID column to a view?

    ebarsamian (5/2/2008)


    Thanks for the help. This is the sql that puts the stored procedure into a temp table with a unique ID:

    CREATE TABLE #trustgoals

    (ID int IDENTITY,

    Trust varchar(100),

    InitialReview varchar(100),

    ReReview varchar(100),

    TotalReview...

    --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: Another Crappy Cursor

    By the way, MDevore, very nice formatting you did on your code. Makes for a really easy read. Nicely done!

    --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: Another Crappy Cursor

    mdevore (5/2/2008)


    HOLY CRAP! :w00t::w00t::w00t::w00t: I rewrote the query based on Jeff's Running Total post, and it went from 8 hours to 6 seconds! Jeff, I bow down before you! THANKS!!!!!!!

    Heh......

    --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 - 50,791 through 50,805 (of 59,091 total)