User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 329,047 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,534 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser:
Views: 157 | Replies: 1
Reply
Join Date: May 2008
Posts: 1
Reputation: Stearmandriver is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Stearmandriver Stearmandriver is offline Offline
Newbie Poster

SQL Query Help... Searching one column in multiple tables?

  #1  
6 Days Ago
Hi all... great forum!

I'm basically on a crash self-learning course in Coldfusion and database-driven sites, so I'm pretty sure I'm missing some basic concept that would make this an easy query. If anyone could point me in the right direction I'd really appreciate it.

This is for a site that deals in fruit juice products - extracts, concentrates etc. All I want to do is create a search form that queries an Access database for all product names containing the search term. For instance, a search on "apple" should return "apple juice concentrate", "apple extract" etc.

Now, that IS easy (even for me) when I try it on just one table. Problem is, I'm going to have multiple tables. I think I need to, because different types of products require different types of specs.

So, here's my "example" problem. The actual database will probably be a little more involved than this, but if I can make this work I'll be able to apply it to more tables, I assume:

1. We have a database with 3 tables - EXTRACTS, ESSENCES, CONCENTRATES. They all contain different columns, BUT they all contain a column PRODUCT_NAME. All the PRODUCT_NAME columns will be text data. None of their values will ever match each other completely.

2. I need a query that will search the PRODUCT_NAME columns in all three tables for records containing the term "apple". I assume this will involve a WHERE-LIKE statement.

I know I need some kind of join for this, and that's where it gets hazy. I haven't been able to find a reference that explicitly clarifies how a join would work in this case. All the examples I find seem to deal with a scenario where the values from one table will match those in another. None of my values will ever match across tables.

Also, I'm guessing this is gonna involve defining keys in the database. Another hazy part.

Thanks much for any help on this. Even a simple link to a reference that you feel would help would be really appreciated!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,210
Reputation: MidiMagic is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 75
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Posting Maven

Re: SQL Query Help... Searching one column in multiple tables?

  #2  
2 Days Ago
What you need is one table with a list of all of the products, and more fields for the different kinds of products to link to the original tables you have.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 5:42 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC