RE: Help with a query
From: Keith Momon <VGFX50A_at_prodigy.com>
Date: 1995/04/25
Message-ID: <3nhq09$m3m_at_usenetp1.news.prodigy.com>#1/1
rem filename:sql1.sql
select distinct order_no from line_items where item_no in (select item_no from items where
SQL> I think this is the solution you were looking for. Received on Tue Apr 25 1995 - 00:00:00 CEST
Date: 1995/04/25
Message-ID: <3nhq09$m3m_at_usenetp1.news.prodigy.com>#1/1
The following script can be used to accept a varaible list of item names and yield the result desired:
rem filename:sql1.sql
select distinct order_no from line_items where item_no in (select item_no from items where
name in (&1)); -----------------------------------------------------------------if you save this file as sql1.sql, it can be used from the SQL> prompt as follows:
SQL> _at_sql1 "'hammer','wrench'"
For the sample data you gave the following output will result: SQL> ORDER_NO
11 99
SQL> I think this is the solution you were looking for. Received on Tue Apr 25 1995 - 00:00:00 CEST