Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2003
    Location
    paris, FRANCE
    Posts
    88

    Unanswered: parsing a single field

    Hello,
    I have a database with a field containing mutliple words separated by comas .
    ID Keywords
    1 steack, meat, tomato
    2 car, porsche, ford
    3 food, egg, cow


    I want to parse this keywords field and to transform this database into another database with a single entry for each keyword. like this:
    ID Keywords
    1 steack
    1 meat
    1 tomato
    2 car
    2 porsche
    2 ford
    3 food
    3 egg
    3 cow

    I know how to parse the keywords field and input each keyword in a separate field in a single entry by using the code at this adress : http://www.mvps.org/access/strings/str0003.htm
    But its not of much use because, afterwards, I want to compare the keywords field with another keywords field to find matches....

    Can someone help me?

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    By "transform" the database, do you mean create a new database, or at least a new table? Is this a one-time transform or will it be part of a process?

    I don't get why you can't use the resulting field to match. Maybe you need to run this as a subquery and then create another query linking to it?


  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    instr function will parse the values and then you have to write them to a table that either autonumbers or captures the numeric in the beginning of the old field and places that in the id column

  4. #4
    Join Date
    Apr 2003
    Location
    paris, FRANCE
    Posts
    88
    Well yes, I want to create a query which will allow me to create a new table, sorry for the inappropriate language. I will later link the fields of the different databases. My final goal is to have two tables like this one:
    ID Keywords
    1 steack
    1 meat
    1 tomato
    2 car
    2 porsche
    2 ford
    3 food
    3 egg
    3 cow
    and to later cross check the tables to find words present in both tables.
    Afterwards, I will feed automatically the first table with new entries, which I parse to get normalised data like the preceding table.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I still don't understand the problem. Are you not able to get the data into the table, or are you not able to query the table afterwards? Can you show what code you are using currently and what the output looks like?

Posting Permissions

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