RobBroekhuis
Technical User
I'm sure this is simple, but I'm new to SQL, especially to queries involving more than one table. I have the following query:
select threads.threadid from posts,threads where posts.threadid=threads.threadid and (text like '%quote%' or subject like '%quote%') order by threadid desc
where threadid is the primary key for table threads, and any threadid can occur one or more times in posts. text is a field in posts, subject is a field in threads. How do I modify this query so that each threadid is only returned once?
Rob
select threads.threadid from posts,threads where posts.threadid=threads.threadid and (text like '%quote%' or subject like '%quote%') order by threadid desc
where threadid is the primary key for table threads, and any threadid can occur one or more times in posts. text is a field in posts, subject is a field in threads. How do I modify this query so that each threadid is only returned once?
Rob