Results 1 to 4 of 4
  1. #1
    Sumanth.Ganjam is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    9

    How to copy data from one column to other using query.

    Hi All,



    I am having excel file where it contains multiple sheets (Sheet 1 , Sheet 2, Sheet 3 etc).

    When i import the excel to Access, File contains one Value in Cell A1 in Sheet 1 and i need to copy the same date to all the Values under Column A and need to copy the same data to all other sheets for Column A.

    Please advise how to write the query for this one.

    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Why is this necessary? What data is in the sheets? Why are there multiple sheets?

    This is a periodic process? The value in cell A1 is different each time? Why does only the one cell in the column have value?

    Easiest approach would be to fill the cells in Excel before import.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Sumanth.Ganjam is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    9
    Hi June 7 and All,

    Please find the below comments :

    Why is this necessary?
    Because there will be 11 sheets and in single sheet only there are more than 50 lines, so avoid manual work in excel.
    Like this 22 countries will be sending the excel sheet.

    What data is in the sheets?
    Headers will be.
    Ticket Id,Material No.,Plant No so on.
    Ticket ID is the header A1.


    This is a periodic process?
    No it is not Periodic process, it is daily process.

    The value in cell A1 is different each time?
    For each time when uploading the Excel, the value in cell A1 will be different.

    I hope this answer all your questions.

    Please help.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    A simple copy down in Excel would quickly populate the cells.

    Otherwise, after the import, run an UPDATE sql action.

    Have to somehow retrieve the TicketID just imported into the table. Will the TicketID be a larger value with each import?

    DoCmd.Execute "UPDATE tablename SET [TicketID='" & DMax("TicketID", "tablename") & "' WHERE TicketID Is Null"

    If the field is a number data type, remove the apostrophe delimiters.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Copy items in a column to the clipboard
    By kevinscomp in forum Access
    Replies: 1
    Last Post: 08-07-2013, 06:57 PM
  2. Replies: 17
    Last Post: 06-25-2013, 05:22 PM
  3. Replies: 9
    Last Post: 06-21-2013, 08:22 PM
  4. Replies: 6
    Last Post: 05-23-2013, 08:14 AM
  5. How do I copy all the data from a Column
    By winterh in forum Queries
    Replies: 5
    Last Post: 04-18-2012, 08:13 AM

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