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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Beginning

Re: Beginning

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Wed, 30 Oct 2002 18:29:11 GMT
Message-ID: <XxVv9.1344$7h3.116806815@newssvr14.news.prodigy.com>


You'll probably get a dozen or so replies ... but didn't see any when I started typing...

tou wrote:
> Hi,
>
> I'm new to ORACLE and I have two questions:
>
> 1 - I used TOAD for exporting some rows with fields separated by ; very
> easy... Now I woul perform an automatic exporta of o table but I can't find
> information about how to do it with SQL Plus console...
>
> I know that with spool command I can 'export' to file, but how can I export
> with fields separated by :, or tab or anything else ?

select varchar2a || ':' || varchar2b || ':' || to_char(numbera) ...

To separate by tabs instead of colons, replace ':' by chr(9).

> 2 - Can I call external programs with triggers ? In fact I want to export a
> table each time a change is made on it...
>

You can write a trigger that will fire whenever a change is made to a table. You can write triggers in PL/SQL or Java. The latter is your better choice because it has a rich set of file output functions.

Look in the doc set (online at http://tahiti.oracle.com) for an AFTER trigger (after insert, update, delete). Received on Wed Oct 30 2002 - 12:29:11 CST

Original text of this message

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