?
Solved

How to extract 3 different select statements into flat file through dump_csv utl funtion.........(in one pstored procedure)....oracle sql to flat files

Posted on 2004-11-08
4
Medium Priority
?
1,034 Views
Last Modified: 2007-12-19
Hi,

I am extracting data from oracle (sql) into flat files(interface).......so i am writing sequel code in one select statement....from many tables and with joins in where clause....and i am assigning this sequel code to dump_csv utl function....to dump into flat file....in unix.....
So my question is i have multiple records...to extract....that means i have 3 different sequel code with select statement..(3 diff. select statements).....I have to write a stored procedure and i wanna put these 3 select statements(sequel codes)...
how can we do it......plz help me....these 3 select statements shoulbe dumped into flat files....(for trailer record)...
in the flat_file it should be printed....horizontally...

ex:-1.   l_rows:=dump_csv('select stamtement...............from tables...where ...joins'),'',
          '/source/oradata/dev/utl_file','  extract.dat');
           dbms_output.put_line(to_char(l_rows) || 'rows extracted to ascii file');
  l

   Like this i have 3 different select statements...so from these 3 select statements out put should come in the one like horizontally...side by side.........


    that means this is needed for trailer record....

   i wanna put 3 diiferent select statemts...in one stored procedure....and dump into flat files....how?

please tell me ...............urgent..... this is required ...for trailer record.....

for accout totals and grand totals......all should come in oneline as output...in (horizantally) from above 3 diff select statemts...

ex:-   rec_type             record count                 amount totals

           100                       30000                          $  10,0000......................

0
Comment
Question by:RAMAN1234
2 Comments
 

Author Comment

by:RAMAN1234
ID: 12529626
data extraction from oracle(sql) into flat files....

3 different sequel codes(select statements) should be written in one stored procedure.........using DUMP_CSV FUNCTION.




HOW PLZ ANSWER..........VERY URGENT......WITH CODE....

Thanks,
0
 
LVL 13

Accepted Solution

by:
alpmoon earned 200 total points
ID: 12529800
I suggest to create three temporary tables and select the result set from these temp tables. But, if you need to run it in Oracle, you should send the question in Oracle area, not Sybase.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
Moore’s Law has proven itself time and time again since it was first introduced. So what’s next? Will Moore’s law continue to remain relevant, or will new technology take over and bring us the next big advancement in computing?
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question