Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> simulating a temp table

simulating a temp table

From: Scott Patterson <scott.patterson_at_trilogy.com>
Date: 1998/02/18
Message-ID: <34eb02c0.0@feed1.realtime.net>#1/1

I need a little help in my Oracle SQL education.

My real problem is a little more contorted than this but this example uses all_objects which everyone will have.

I have a list of objects that I need to check if they are in all_objects, only listing the items that are not found. This is easily done with the following statements but I would like to accomplish this without creating the tmptab table. With the SQLServers or Informix I would use a temp table. How should I be attacking this with Oracle?

This will be running from a SQLPlus script.

Thanks,
Scott Patterson
Trilogy Development Group
scott_patterson_at_trilogy.com



create table tmptab (obj_name varchar2(30));
insert into tmptab values ('DBA_TABLES');
insert into tmptab values ('V$PARAMETER');
insert into tmptab values ('WILL_NOT_BE_FOUND');
insert into tmptab values ('ALL_USERS');
select obj_name from tmptab where obj_name not in (

   select obj_name from tmptab, all_objects where obj_name = object_name); drop table tmptab; Received on Wed Feb 18 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US