Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Beginning
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