BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simple SQL help.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
Ron Sawyer
Guest





PostPosted: Sun Feb 08, 2004 12:27 am    Post subject: Simple SQL help. Reply with quote



I admit it. I'm an SQL moron. Never did much with it. And now I'm
building a very simple app for my mother to manager her recipes. The
database structures are:

Document Table
--------------
int DocID
String(255)Document Name


Word Table
----------
int WordID
String(40)Word


Dictionary Table
----------------
int DocID
int WordID

When a recipe is added it is placed in the Document Table with an ID of
X
Each word is extracted and is placed in the Word Table with and ID of Y
A record is then added tot he Dictionary table with placing X and Y in
the correct fields

The use cases for the search are:

1. Select all documents with ANY of the words asked to be searched
2. Select all documents with ALL of the words asked to be searched.

Can you help me write the SQL statements? The first one doesn't seem to
difficult. The second one seems tougher.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.