473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Extracting data from multiple fields

jimleon
74
I have a table of customers business categories with 13 fields - customer, category1, category2, ....... category12. The first field contains the customers name and the next 12 contain categories, so the customer may have between 1 & 12 different categories (ie plumber, delivery driver). These category descriptions where generated from a pull down box on a form, from the table 'category'.
I need to write a query to output tabulated results with each category listing all the customers who have selected that category thus...

Architect
Smith & sons
wright ltd

Electrician
jones electrical
wright ltd
petersons

Builders
petersons

etc...

Any help would be most appreciated.

Thanks in advance guys
Jan 11 '07 #1
5 1298
Not so sure if this will help but try Crosstab Query.

I believe its more easy to make some queries if you will change your structure. Make one new table e.g tblCustomerCategory then add 3 fields:
CustomerID - this will link to the main customer table
Category - same approach
Timestamp - default value now() just for your info when the record inserted.

from the structure you are not limited.

HTH,
George







I have a table of customers business categories with 13 fields - customer, category1, category2, ....... category12. The first field contains the customers name and the next 12 contain categories, so the customer may have between 1 & 12 different categories (ie plumber, delivery driver). These category descriptions where generated from a pull down box on a form, from the table 'category'.
I need to write a query to output tabulated results with each category listing all the customers who have selected that category thus...

Architect
Smith & sons
wright ltd

Electrician
jones electrical
wright ltd
petersons

Builders
petersons

etc...

Any help would be most appreciated.

Thanks in advance guys
Jan 11 '07 #2
jimleon
74
Still not sure how that would work as I have 3 lists of data to work with, customer, category (1-12) and the category description.
Jan 11 '07 #3
NeoPa
32,556 Expert Mod 16PB
Try working from something like this :
Expand|Select|Wrap|Line Numbers
  1. SELECT Customer
  2. FROM Categories
  3. WHERE Category1 & Category2 & Category3 & Category4 & Category5 & Category6 & Category7 & Category8 & Category9 & Category10 & Category11 & Category12 Like '*' & [Enter required Category] & '*'
Jan 12 '07 #4
jimleon
74
Thanks NeoPa
That works fine.

Cheers
Jan 18 '07 #5
NeoPa
32,556 Expert Mod 16PB
My pleasure.
It's good to be able to post ideas rather than the full solution with all i's dotted and t's crossed for a change :)
Jan 18 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Michael Hill | last post by:
Hi, folks. I am writing a Javascript program that accepts (x, y) data pairs from a text box and then analyzes that data in various ways. This is my first time using text area boxes; in the past,...
1
by: goldtech | last post by:
Right-click on a jpeg in XP click "summary" tab and there are metadata fields. My questions are: How can I extract this data for each jpeg? Is this exif data is it some proprietary MS format?...
4
by: Otis Hunter | last post by:
I have been given an Access Database which contains a table that has an OLE object field that contains a Word document. That table contains hundreds of records. I would like to find out how I can...
4
by: Debbiedo | last post by:
My software program outputs an XML Driving Directions file that I need to input into an Access table (although if need be I can import a dbf or xls) so that I can relate one of the fields...
6
by: Werner | last post by:
Hi, I try to read (and extract) some "self extracting" zipefiles on a Windows system. The standard module zipefile seems not to be able to handle this. False Is there a wrapper or has...
8
by: Wingot | last post by:
Hey, I have a program I am trying to write using Visual C#, SQL Server 2005/2008, and Visual Studio 2008, and one part of it includes a Schema called Client. Inside this schema, three tables...
4
by: apatel85 | last post by:
Hey Guys, Total Number of Records (Based on 5 fields): 1000 Total Unique Records (Based on 5 Fields): 990 Total number of fields: 5 I have question regarding extracting duplicates from the...
22
by: sivadhanekula | last post by:
Hello Everyone A quick and direct question: I need a C/C++ program to extract the data from the database and the output should be in CSV "Comma Separated Value" format. Briefly: I will be given a...
47
by: ndedhia1 | last post by:
I have data in a database that looks like this: INSERT INTO ALARMNOTIFICATIONDETAIL VALUES ('1865', '2295', '15401', '1', 'Prodprdcons11InstrumentationMonitor', 'ALL'); INSERT INTO...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.