Results 1 to 2 of 2
  1. #1
    jscriptor09 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    60

    code logic help

    Hi folks

    I have regular csv file that I regularly import into an access 2010 db. right now, the csv come in in this format



    row title ... Dept , Resources, location, week1, week2, week3 ....
    row 1 ... PROD, Jim , SWE ,0 , 10 , 45 ....
    row 2 ... RD , Sue , N ,0 , 10 , 45 ....
    ...
    ....


    there are 150+ weeks (3 years)
    and 4600 rows of data

    before importing into ACCESS, I need to convert the FW into single field. Bascially, it needs to be:
    FW, Dept, Resources, Location, Values

    I have a for i and for j loop to do the transpose. I do in in Excel VBA before importing the file into access.

    As you can imagine, the resulting trspose is 600,000+ lines

    The Excel process to do the transpose is very inefficient. The looping takes over 1/2 hr.

    Any thought on how to improve this, or even abetter way would be appreciated.

    thanks
    Mike

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    FW???

    Suggest you import to an Access temporary table; then create some queries to move the appropriate data to normalized tables. You do not want week1,week2,week3 in the same table --
    I can see tables along this: (along with appropriate junction tables)

    Dept
    Resources
    Location
    TimePeriod

    But we really don't know anything about your Business or environment.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Please help with the logic
    By Del23 in forum Access
    Replies: 1
    Last Post: 08-23-2012, 12:13 PM
  2. code logic error
    By mejia.j88 in forum Programming
    Replies: 17
    Last Post: 03-27-2012, 10:03 PM
  3. need better VBA logic than I currently have
    By jscriptor09 in forum Programming
    Replies: 4
    Last Post: 11-27-2011, 09:16 AM
  4. Can't get the logic right.
    By Nouri31 in forum Queries
    Replies: 3
    Last Post: 03-31-2011, 08:25 AM
  5. Need help with code logic/consolidation
    By bg18461 in forum Programming
    Replies: 1
    Last Post: 03-31-2010, 04:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums