Results 1 to 5 of 5

Thread: Split column

  1. #1
    Join Date
    Jul 2004
    Posts
    34

    Unanswered: Split column

    Hi everybody

    Does any body know how to split a field in a table into two fields

    eg
    usermaster(table)
    userid(field)

    usermaster has 40 users with user id 1 to 40
    i want to get data as

    userid userid
    1 21
    2 22
    3 23
    . .
    . .
    . .
    20 40

    Thanks you very much

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You would need to count the rows (presumably it won't always be 40!), work out the half-way point, and then divide the data up.

    Do you want to do that in pure SQL, or as a program?

  3. #3
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    It does seem that the only thing you want is to add 20 to the userid.. which would only be doing this in a simple ..select userid, userid+20 .. is that what you want ?

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Cross Post

    I already did this...what platform are you on?

    http://www.dbforums.com/t1055080.html
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Jul 2004
    Posts
    34

    thnks

    Thank you Bret Kaiser Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •