Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    100

    Unanswered: moving data between tables

    I am trying to do a monthly closing in which a single field and all its accompanying data would be moved from one table to another.

    Current Data Table:

    ProjectId...Hours6...Hours7....Hours8....Hours9... ..Hours10
    APPL.........11.............11...........11....... ....66...........16
    MSFT........12.............12...........12........ ...55...........19
    DELL.........12.............12...........18....... ....98...........14
    MONE........12.............12...........06........ ...42...........12
    COKE........12.............12...........15........ ...12...........12
    PEPSI........12.............12...........12....... ....12...........12


    Archived Data Table

    ProjectId..ArcHrs1...ArcHrs2....ArcHrs3....ArcHrs4 ....ArcHrs5
    APPL.........11.............11...........11....... ....66...........16
    MSFT........12.............12...........12........ ...55...........19
    DELL.........12.............12...........18....... ....98...........14
    MONE........12.............12...........06........ ...42...........12
    COKE........12.............12...........15........ ...12...........12
    PEPSI........12.............12...........12....... ....12...........12

    I would be moving the data from the Hours6 field into a new field called ArcHrs6 in the archived data table.

    Thanks!
    Last edited by norm801; 03-03-04 at 12:02.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: moving data between tables

    Originally posted by norm801
    I am trying to do a monthly closing in which a single field and all its accompanying data would be moved from one table to another.

    Current Data Table:

    ProjectId...Hours6...Hours7....Hours8....Hours9... ..Hours10
    APPL.........11.............11...........11....... ....66...........16
    MSFT........12.............12...........12........ ...55...........19
    DELL.........12.............12...........18....... ....98...........14
    MONE........12.............12...........06........ ...42...........12
    COKE........12.............12...........15........ ...12...........12
    PEPSI........12.............12...........12....... ....12...........12


    Archived Data Table

    ProjectId..ArcHrs1...ArcHrs2....ArcHrs3....ArcHrs4 ....ArcHrs5
    APPL.........11.............11...........11....... ....66...........16
    MSFT........12.............12...........12........ ...55...........19
    DELL.........12.............12...........18....... ....98...........14
    MONE........12.............12...........06........ ...42...........12
    COKE........12.............12...........15........ ...12...........12
    PEPSI........12.............12...........12....... ....12...........12

    I would be moving the data from the Hours6 field into a new field called ArcHrs6 in the archived data table.

    Thanks!
    How do you want to do this? Manual? Code? Combination of both?

    Code: At a minimum you'll need to issue an ALTER TABLE command and then issue UPDATE queries for your rows ...

  3. #3
    Join Date
    Jan 2004
    Posts
    100

    Re: moving data between tables

    Originally posted by M Owen
    How do you want to do this? Manual? Code? Combination of both?

    Code: At a minimum you'll need to issue an ALTER TABLE command and then issue UPDATE queries for your rows ...
    I'm hoping to do it using code.

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: moving data between tables

    Originally posted by norm801
    I'm hoping to do it using code.
    Then what I said before applies ... You'll need to issue an ALTER TABLE SQL query and then you can run UPDATE queries ...

Posting Permissions

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