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 -> piping sql output to a file

piping sql output to a file

From: Mike Godfrey <no_spam_at_questionn.net>
Date: Thu, 01 Jul 1999 10:47:34 -0400
Message-ID: <377B7F86.53498731@questionn.net>


Hello,

    I'm new to oracle and sql. I have a list of records that I would like to pull out of the database. The only way I know how to is to make each one a seperate query (select statement). Is it possible to retrive all the information I would like in one select statement. Please see code below:

select distinct

      pi.piname,
      pi.createdby,
      pi.createdon,
      f.folpath
from  pdm.pdm_productitem pi,
      pdm.pdm_folder f

where pi.piname = 'apc-pwbasm.bmp' <--This is the only line that changes for each select command

      and pi.folid = f.folid
order by pi.piname;

select distinct

      pi.piname,
      pi.createdby,
      pi.createdon,
      f.folpath
from  pdm.pdm_productitem pi,
      pdm.pdm_folder f
where   pi.piname = '8x8__.prt'
      and pi.folid = f.folid

order by pi.piname;

Also is it possible to redirect the output to a file.

my email address isn't correct, i don't want any spam, just post the reply up on the newsgroup.

Thank you
  Mike Received on Thu Jul 01 1999 - 09:47:34 CDT

Original text of this message

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