Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 34
  1. #16
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I sympathise...as I've had similar experiences myself.



    However, can I suggest you use this opportunity to put both sets of LinkedIn contacts into a single table (with no duplicates).
    If necessary, you can always add a field to identify which LinkedIn source each record comes from.

    Having one table means no union query is required so the issue with read only queries should be solved
    Last edited by isladogs; 10-21-2020 at 10:39 AM.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  2. #17
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    that's for sure, when i build the first system i was not so competent. probably i'll make an append query to fill a local table
    thanks

  3. #18
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    That's exactly what I was suggesting. Good luck
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #19
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    Sorry for keeping asking but i found some issue.
    fist of all the csv files give me problems, both using " as text qualifier than not using it. there are some guy that in a single field like "position" wrote something as "polonia, estonia, hungary" etc etc, that's a problem. The other problem is that someone uses " in some field.
    is there any way to solve that problem?

  5. #20
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    My approach to importing data from CSV files is as follows:
    1. Link the CSV files as linked tables
    2. Import the data to 'temp' buffer tables (AKA staging tables) for processing
    3. Do any processing required on that data then append into the final tables
    In your case that would include:
    a) separating out your multiple item text into separate records
    b) replacing any instances of " with a character such as ¬ before appending then replace all ¬ with " after import
    4. Empty your buffer tables

    Hope that helps
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #21
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    there's something i'm missing

    i linked the csv file to my access in a linked table, the problem is that records that contains quotes are not divided by fields, and when i append to a local table the problem is still. How can i remove quotes before the import of the records field by field?

    and more, the first three line are just an annotation, is there any way to start importing from the real column header?
    Click image for larger version. 

Name:	Cattura.PNG 
Views:	16 
Size:	8.4 KB 
ID:	43290

  7. #22
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    It would be better to remove the first 3 lines completely from the CSV file.
    If not it will be necessary to write a routine to deal with those - I'll leave someone else to assist with that.

    Form your screenshot, you seem to have chosen fixed width when linking the CSV file.
    Instead link it choosing delimited with comma as the field separator and " as text qualifier

    If you have any fields with text including a ", then you need to replace those with e.g. ¬ before importing into your table & then reverse that afterwards

    To do so, first create a SELECT query similar to this (replacing table & field names to match your own)

    Code:
    SELECT Field1, Field2, Replace(Field3,"""","¬"), Replace(Field4,"""","¬"), Field5 ... FROM YourLinkedCSVTable
    This assumes Field3 & Field4 have quotes in the field contents
    NOTE: I deliberately used 4 sets of quotes """" above as you need to double up the inner " you want to replace

    Check the outcome is what you want then convert the SELECT query into an APPEND query
    ...OR save the SELECT query then make an APPEND query based on that

    Once the data has been imported into your table, run another query to replace all instances of ¬ with " again
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #23
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    sorry, i linked the csv using " as text delimiter, then ran the query:

    Code:
    SELECT Replace([first name],"""","¬") AS Firstname, Replace([last name],"""","¬") AS Lasttname, Connections1.[Email Address], Connections1.Company, Connections1.Position, Connections1.[Connected On;;;]FROM Connections1;
    but it gives me the error you see

    I Used too the query you made but the same error

    Click image for larger version. 

Name:	InkedCattura_LI.jpg 
Views:	12 
Size:	82.7 KB 
ID:	43323

    maybe i'll use a routine to get rid of quotes and import correctly the csv

  9. #24
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Do you really get double quotes (") in first & last name fields?
    I can understand getting single quotes/apostrophes (') in last name e.g. O'Neill and perhaps in first name as well.
    If that is what you are referring to, you need to replace the single quote instead.

    Hope that helps
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  10. #25
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    nope unfortunely.
    the problem appears with the double quotes.
    i think the only solution is to use a recordset and import with a subroutine, i have to think a good procedure to do that

  11. #26
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Can you give an example
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  12. #27
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    this is one of the lines that gives me problems (i changed names)

    EDIT i changed the attachments, i forgot the headers
    Attached Files Attached Files

  13. #28
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    But that text with the double quotes is not in the first or last name fields.
    It appears to be in the Position field so you need to use the Replace function in that field
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  14. #29
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    i tried with every field, but nothing. don't worry, i'll find another solution.
    if you can i can pm he whole file however

  15. #30
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I don't think you can attach files to a PM. In any case, please upload a cut down version to the forum.
    That way someone will look at it & hopefully solve your issue

    Please provide the CSV file as well as the destination table & any code / queries used to manage the import
    Nothing else should be included.
    Only a few problem records need to be included in the CSV & better to change names.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Updatable query
    By Syla in forum Queries
    Replies: 3
    Last Post: 03-25-2020, 10:22 AM
  2. Non-Updatable Query Problem
    By RMittelman in forum Programming
    Replies: 4
    Last Post: 11-22-2019, 09:13 AM
  3. Updatable query in Access 2010
    By haydenbl in forum Queries
    Replies: 12
    Last Post: 11-05-2013, 06:59 PM
  4. Updatable query
    By Starscream in forum Queries
    Replies: 3
    Last Post: 04-26-2013, 07:59 AM
  5. Operation must be an updatable query
    By Lorlai in forum Queries
    Replies: 5
    Last Post: 02-02-2012, 02:04 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