SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot egiblock's Avatar
    Join Date
    Aug 2001
    Location
    Mentor, Ohio
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    splitting a column variable int two by a macro

    using microsoft access xp

    i need help seperating a variable called TournamentID into two variables and placing them into another table...

    In ->
    Tournament ID - 11112222

    Output into another table ->
    SCH - 1111
    PID - 2222

    macro or any other way, please help !

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,251
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Code:
    insert 
      into othertable
         ( SCH
         , PID  )
    select Left(TournamentID,4)
         , Mid(TournamentID,5,4)
      from firsttable
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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