On Tue, Mar 19, 2002 at 12:45:57AM -0000, Alex Speed wrote:
> Ok, no support for it (d'oh), so, how do I go about breaking it down into a
> join or something like that?
> 
> ----- Original Message -----
> From: "Alex Speed" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 19, 2002 12:13 AM
> Subject: SubSelect Problem
> 
> 
> > SELECT textid, title, description from structure where textid in (select
> > subtopicid from subtopic where topicid='Top');

Off the top of my head:

    SELECT DISTINCT st.textid, st.title, st.description  
    FROM structure st INNER JOIN subtopic su 
        ON st.textid = su.textid
    WHERE su.topicid = 'Top';

I haven't run this, so I can't guarantee that it will work.

Bob Hall
--
Database, table, query.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to