-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You need 2 tables: Keywords and Articles.
CREATE TABLE KeyWords (
ArticleID INTEGER NOT NULL ,
Keywd VARCHAR(20) NOT NULL ,
CONSTRAINT PK_KeyWords PRIMARY KEY (ArticleID, Keywd)
)
Data would look like this:
ArticleID Keywd
- --------- -----------
1 Rumsfeld
1 terrorist
1 facism
2 pie
2 apple
2 strawberry
2 a la mode
CREATE TABLE Articles (
ArticleID INTEGER NOT NULL PRIMARY KEY,
Article TEXT NOT NULL ,
ArticleDate DATE NOT NULL
)
The Article column would be a Memo field in JET.
Data could look like this:
ArticleID Article
- --------- --------------------------
1 Today, Secretary of Defense Donald Rumsfeld .... etc.
2 The favorite pie of the local sherrif was reported ...
The search would be in the Keywords table joined to the Articles
table:
SELECT Article
FROM Keywords As K INNER JOIN Articles AS A
ON K.ArticleID = A.ArticleID
WHERE K.Keywd = "pie"
This would return ArticleID 2's Article column value.
You could also use the LIKE test in the WHERE clause:
....WHERE K.Keywd Like "Rums*"
Or, the IN predicate in the WHERE clause:
.... WHERE K.Keywd In ("Rumsfeld","terrorist")
HTH,
MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBP7qB24echKqOuFEgEQJT2ACgh30i0JqSpIAsb8JUKnWFDm 4yntcAn0/2
86WhQJrkL0ZbeCf1C8daDa+4
=4gND
-----END PGP SIGNATURE-----
Mike Webb wrote:
[I am very new to Access.]
I want to design a query to return scanned newspaper articles based on
assigned keywords. I put a field in my table with a look-up list of 8
keywords. Each article can have 1 or more keywords assigned.
Can't figure out how to do it.
I have a book called "Office XP: The Complete Reference" from Osborne/McGraw
Hill. Helpful, but I can't find an example of this. Looked at Access Help,
but couldn't find what I needed.
My goal is to have a form for users to ask the database "List all records
with keywords AAA, BBB, and CCC", for example. After I get this licked I
want to add date ranges to look for articles with certain keywords (or just
all articles within the dates specified).
Can someone point me in the right direction?
Thanks in advance,
Mike
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----