Hi John,

I think there are two options that will help you - one would be to
simply spool sql*plus, the other would be to use Oracle's UTL_FILE
package (PL/SQL).

Tom has a good example:

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:68212348056

If you needed to then load it to another Oracle system/environment,
one idea might be to set it up as an external table (or use
SQL*Loader) and simply reference it as a table from that side.

Good luck!

-T.

ps - Rob, sorry for replying directly to you ... was my first post. :)

On Apr 23, 9:31 am, rob wolfe <rob.wo...@oraclegeeks.com> wrote:
> Just want to reinforce that my post wasn't meant to be a personal
> criticism of Iyad. It is just that his solution, while the answer to a
> common problem, was not the answer to the problem posed and I would hate
> for the OP to go down the garden path.
>
> Rob
>
>
>
> Mouhammed Iyad wrote:
>
> > Nice Morning Dear,
>
> > I have an Idea,
>
> > I used to face the same problem but I find a good solution,
>
> > first you have to create an ODBC connection to oracle,
>
> > then easily you can make a connection in Excel file can read from
> > Oracle using ODBC & whenever you like you could refresh the data,
>
> > It's fast & easy,
>
> > Best Regards,
>
> > Iyad
>
> > 2009/4/23 Rob Wolfe <rob.wo...@oraclegeeks.com
> > <mailto:rob.wo...@oraclegeeks.com>>
>
> >     On Wed, April 22, 2009 18:26, John wrote:
>
> >     > can anyone please help... No gurus in this groups can suggest
> >     > something ?
>
> >     > On Apr 22, 7:30 am, John <johnysm...@gmail.com
> >     <mailto:johnysm...@gmail.com>> wrote:
> >     >> For a small automation project I have to extract data from a table/
> >     >> tables and append it to the existing excel file and feed that excel
> >     >> file to a command that will load data into some other
> >     environment. I
> >     >> am totally new to this. So to get started I wanted to know,
> >     >> 1) How to extract data from sample table Foo which has columns
> >     A,B,C
> >     >> and append these values as new columns to an existing excel say
> >     >> fooresults.tsv ?
> >     >> 2) Can I achieve this in pl/sql script or do I need to write
> >     unix or
> >     >> perl script or some other programing language, please advise?
>
> >     >> Thanks a lot,
> >     >> John
>
> >     I have a couple of thoughts on this
>
> >     1) I don't normally think of a TSV file as being an Excel file
> >     except in
> >     the sense that Excel can read and write it.
>
> >     2)you dont need PL/SQL to do this.  My unix is a bit rusty so
> >     someone can
> >     correct me but wouldnt something like the following work from the unix
> >     command line?
>
> >     sqlplus < foo.sql >>fooresults.tsv
>
> >     Where foo.sql had something like
>
> >     select A||chr(9)||B||chr(9)||C from foo;
>
> >     plus appropriate login credentials ?
>
> >     also note that I probably didnt create a proper TSV file but I
> >     think that
> >     can be left as an exercise (^I is a tab isnt it?)- Hide quoted text -
>
> - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to