Received: from pooh.strategicnetwork.org (IDENT:root@pooh.strategicnetwork.org [159.26.242.70]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA51633 for ; Tue, 5 Oct 1999 10:12:28 -0400 (EDT) (envelope-from justinlong@strategicnetwork.org) Received: from nsmjustinlong (sampson.cbn.org [159.26.240.128]) by pooh.strategicnetwork.org (8.9.3/8.9.3) with SMTP id JAA14061 for ; Tue, 5 Oct 1999 09:20:26 -0400 Reply-To: From: "Justin Long" To: Subject: Proper syntax of WHERE (select...)? Date: Tue, 5 Oct 1999 10:05:00 -0400 Message-ID: <006301bf0f3a$9caf09a0$95421a9f@nsmjustinlong.cbn.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 In-reply-to: <005501be9c7c$fde98550$bdd0be80@belvoir.army.mil> Importance: Normal I am attempting to generate a random select from a database. Here's basically what I'm trying to do: 1. select the qualified segments from a databaes (the query is... where moderator>'' and leadin>'') 2. from this selection, select 3 random segments. I had thought that select id,name,leadin from country where oidrand(oid,3) in (select id,name,leadin from country where moderator>'' and leadin>''); would work, but it definitely doesn't. I've been hacking around on this for a while and can't seem to find a solution. I can get the system to select a random number from the database, but not a random number of qualified results. Any suggestions from anyone? Never retreat. Never surrender. Never cut a deal with a dragon. _______________________________________________________________ Justin Long Executive Producer 616 Station Square Ct http://www.strategicnetwork.org Chesapeake, VA 23320 Network for Strategic Missions JustinLong@strategicnetwork.org 977 Centerville Trnpk CSB 317 757-226-5011 Va Beach, VA 23463, USA