Forum Replies Created

Viewing 15 posts - 52,126 through 52,140 (of 59,067 total)

  • RE: Simple Method for Importing Ragged files

    brewmanz.sqlservercentral (3/5/2008)[hrI was hoping for the import of the classic ragged-right file - a variable number of fields in records that are wanted.

    For your definition of "ragged right", 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: Simple Method for Importing Ragged files

    paul.ibison (3/5/2008)


    True - the title is a little misleading. The problem is that there isn't a 'correct' term for such files and this is the nearest commonly understood one. Anyway,...

    --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: Get Only the File Name

    Sure... dunno how many of these you have to do, but the following is about twice as fast because there's only 1 Reverse and RIGHT is faster than SUBSTRING.

    [font="Courier New"]DECLARE&nbsp@FileName&nbspVARCHAR(256)

    &nbsp&nbsp&nbsp&nbspSET&nbsp@FileName&nbsp=&nbsp'D:\File\Data\test\Test.xls'

    &nbspSELECT&nbspRIGHT(@FileName,CHARINDEX('\',REVERSE(@FileName))-[/font]1)

    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: Need to return query result in 0.02 sec

    I asked the business analyst to make sure how many shopper actually has those fields populated.

    Wait a minute... are you saying that a system already exists and already has customers...

    --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: Help on splitting the name field in a query

    Ya know... I busted a bit of a hump for ya here... and no one on the other forum came close... the least you could do, MH, is let me...

    --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 to return query result in 0.02 sec

    Steady... don't let this shake you, Loner...

    And 5000 hits per second does not equal .02 seconds... on a single cpu system, that would be .0002 seconds. Multiply that times...

    --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: Varchar(max) problem in SQL server 2005

    The length of the number of characters plus 6 or 8 bytes worth of length info.

    Question is, why are you using VARCHAR(MAX) if it'll never get bigger than a thousand...

    --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: small issue

    Heh... And the GUI rules... it may take longer and it may run slower, but the GUI rules.

    Bill Gates was right 15 years ago... someday there won't be any...

    --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: Timetable report

    spencepa (3/4/2008)


    Matrix seems to work but if a student has a 15 min tutorial, this fills a whole column the same as a hour

    What do you want it to do?

    --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: Selecting random rows

    Based on that link, I'm thinking this is someone's homework... wait a minute... I've got a porkchop around here somewhere... maybe even a Yak Burger, huh, Peter?

    --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: What is a Cursor?

    Only if you promise to avoid cursors and while loops like they were going to kill you... because they'll certainly kill the performance of your code. There's almost always...

    --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: Selecting random rows

    I sure do... read the URL in my signature. People will come screaming out of the woodwork to answer your question almost before you can ask it if 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: Calculating Agregate value based on select statements from different tables

    Welcome aboard... first, here's one answer two your problem...

    SELECT

    (

    SELECT SUM(ROOMREVENUE) AS 'ROOM REVENUE' FROM RPT_HOTEL_STATS WHERE PROPERTY = 'DELSOL'

    AND STAT_DATE > '2007-12-31 00:00:00.000'

    AND STAT_DATE <= DATEDIFF(day, 0, getdate())

    )

    /

    (

    select SUM(NUMROOMS) FROM...

    --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: Assigning value to variable. Another attempt.

    willyboy (3/4/2008)


    It is just not updating the JobSteps table.

    How do you know that? What if it's updating the table with the same stuff that you have in it (NULLS?)...

    --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: Assigning value to variable. Another attempt.

    willyboy (3/4/2008)


    It would not surprise me if someone wanted to reach through the internet and throttle me.

    Depends... do ya like porkchops? 🙂

    --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 - 52,126 through 52,140 (of 59,067 total)