Iyad, That would work except for the fact that the requirement was to append to a TSV file. I am guessing that the source table gets periodically emptied and refilled, hence the reason to append to the file rather than just create a new one. He also mentioned that he was on a unix box (or i wouldnt think he would be mentioning perl and unix scripting) and to the best of my knowledge excel isn't really much of an option on a unix box (let's not digress into OpenOffice) unless you are running it in an emulator and that sounds like WAY more work than it is worth for this small problem.
Also note the fact that the OP specifically said that it was a TSV which is not actually a real excel file. You cannot have queries embedded in TSV files, you would have to recreate it each time which would be a pain in the butt. You might as well just use your favorite query tool and dump it each time. I agree that if you need to do a full refresh in a legitimate excel file you have a nice solution because I use it practically every day but it seems to me that it doesn't suit the OP's problem as stated.. It would be nice if the OP would come back and offer a little more info since he seemed to be in such a rush yesterday to get an answer. 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?) > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---