|
-
September 4th, 2001, 06:50 AM
#1
SEEK/FIND
i have a database with 3 forms covering different data... i wont to create a main search that will search all 3 tables ta once and return the corresponding search...in a new table with all the info from the table related to the search any ideas, or examples of this.....
midnightservice
thanks in advance
-
September 4th, 2001, 07:03 AM
#2
Re: SEEK/FIND
Try to use join to search all 3 tables.
Iouri Boutchkine
[email protected]
-
September 4th, 2001, 09:50 AM
#3
Re: SEEK/FIND
You can combine multiple select statements using the UNION keyword. Note that all select statements must return the same amount of columns, and that the datatypes of the columns in the different tables matches.
SELECT ColumnA, ColumnB, ColumnC
FROM TabelA
WHERE ColumnA Like '*VBCodeLibrary*'
UNION
SELECT ColumnA, ColumnB, ColumnC
FROM TabelB
WHERE ColumnA Like '*VBCodeLibrary*'
UNION
SELECT ColumnA, ColumnB, ColumnC
FROM TabelC
WHERE ColumnA Like '*VBCodeLibrary*'
Here I matched them up using the same condition, but you can create a different WHERE clause for each select statement.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|