Combine 2 Text Fields??

  • You dont need to be a jerk about it. I made a mistake. I guess that I'm not perfect like you.

    Jeff Moden (1/17/2008)


    jkurtis (1/17/2008)


    theres a couple problems with that.

    The 1st is that I'm on SQL2000.

    And people wonder why I get ticked at some users... what were you thinking when you posted this on a 2005 forum without saying you were using 2k in advance? You wasted a bunch of people's time...

  • Yeah... I do need to be a jerk about it... you wasted time by not posting in the correct forum and not telling us which version of SQL you were using. We don't get paid for this... the least you could do is pay some attention when you post. 😉

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

  • No, you don't need to be a jerk about it. People make mistakes, I made a mistake. You cant tell me that you've never made a mistake before. And since you didn't reply with any attempt to help me with the problem, I hardly believe that I wasted your time. If you did spend a huge amount of time on it then you sir need to get a more meaningful life. Get off your high horse.

    Jeff Moden (1/18/2008)


    Yeah... I do need to be a jerk about it... you wasted time by not posting in the correct forum and not telling us which version of SQL you were using. We don't get paid for this... the least you could do is pay some attention when you post. 😉

  • Dang! You're spot on! I DO have better things to do than to help you. Thanks for the advice 😉

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

  • This should work in SQL 2005

    tbl_a

    ID INT NOT NULL

    col_a TEXT NULL

    col_b TEXT NULL

    UPDATE tbl_a

    SET col_a = convert(varchar(max), col_a) + '. ' + convert(varchar(max), col_b),

    col_b = NULL

    WHERE

    isnull(convert(varchar(max), col_b), '') <> ''

  • Heh... perfect...

    --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 6 posts - 16 through 20 (of 20 total)

You must be logged in to reply to this topic. Login to reply