Forum Replies Created

Viewing 15 posts - 43,651 through 43,665 (of 59,097 total)

  • RE: Last number from a Text Field

    antonio.collins (5/31/2009)


    We've had this debate before and the delimiting function's performance can practically always be improved by a hand-written piece of SQL. But the delimiting function's flexibility and simplicity...

    --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 number from a Text Field

    As a side bar, I really really hate these new code windows.... they haven't worked correctly for months now. They keep saying they're going to fix them, but they've...

    --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 number from a Text Field

    antonio.collins (5/30/2009)


    NathanB (5/29/2009)


    Hey guys, been struggling with this one for a bit and about to head home, but does anyone know how I'd get "18669911.96" out of this Text field?

    "FFX...

    --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 number from a Text Field

    Ramesh (5/30/2009)


    arun.sas (5/29/2009)


    Which one is better in all Situations?

    ARUN SAS

    If you read the OP's original post he has mentioned that he wanted the entire text that follows the last space.

    Though...

    --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 number from a Text Field

    arun.sas (5/29/2009)


    Spot on, Ramesh. And, you made it easy to convert to the MONEY datatype so you can use the result number for calculations.

    Hi jeff,

    Ok with the Ramesh statements,

    But,...

    --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 number from a Text Field

    Ramesh (5/29/2009)


    See if this helps.

    ; WITH TestCTE

    AS

    (

    SELECT'FFX Buy USD/Sell AUD, Broker 703 MATURITY 11/05/09 SOLD AUD 18,669,911.96' AS SomeText

    UNION ALL

    SELECT'FFX Buy $/Sell $, Broker 471 MATURITY 11/05/09 SOLD $878.96' AS...

    --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: Data Archiving

    Shamshad Ali (5/27/2009)


    We found that the bottlneck is SQL Server all the time.

    Nope... it's not SQL Server. It's the code that's running against SQL Server. You say you've...

    --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 Sports Salary

    Would you like a less subjective, and more open salary system?

    Nope... I don't want anyone to know how much more I make than them. 😉

    --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: Select Data in XML

    Heh... "XML is case sensitive"... one more reason for me to keep it out of my databases. 😛

    --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: Convert string to human readable date/time format

    Jack Corbett (5/29/2009)


    I like it Jeff. I always forget about STUFF(). It's a great function.

    Thanks Jack. I appreciate the feedback. Just remember.... STUFF right to left...

    --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: Date Function for SQL Server 6.5

    Oh, yeah.... the other thing to try is changing the "0" date to '1900-01-01' everywhere.

    --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: Date Function for SQL Server 6.5

    You appear to be missing part of the query after the AND. What's the full query look like?

    --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: Converting Character to DATETIME

    Different take on the same thing...

    DECLARE @DateString VARCHAR(50)

    SET @DateString = '2009-02-26T00:00:00.0000000-08:00'

    SELECT CONVERT(DATETIME,LEFT(@DateString,23),126)

    + CAST(RIGHT(@DateString,5) AS DATETIME)

    I couldn't remember 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: count spaces between two strings

    ukumawat (5/29/2009)


    hi all,

    is there any method to count number of spaces between two strings?

    thanks in advance.

    Andrew's method will work just fine, but I have to ask because this sounds like...

    --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: Trying to get the differance between two dates

    andrewd.smith (5/29/2009)


    Lookup DATEDIFF TSQL function in SQL Server Books Online

    Heh.... try it, Andrew. 😉 You may be surprised how difficult that recommendation actually 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)

Viewing 15 posts - 43,651 through 43,665 (of 59,097 total)