Home » SQL & PL/SQL » SQL & PL/SQL » Data Pulling (oracle 10g R2 , Windows XP)
Data Pulling [message #349962] Tue, 23 September 2008 10:45 Go to next message
jagadeeshg
Messages: 14
Registered: December 2007
Location: BLR
Junior Member

Hi Gurus

As a part of my job I connect to customer database and pull the data and anlayze the data (some times thousands of records) for errors. I run normally sql report and generate a flat file and convert into EXCEL with delimters.
I feel it is time consuming. I want some easy way to do it.

My requirement is as follows.
Eg:
I will be writing query like this
select * from emp;

or specifying specific columns

select empno,ename , dept from emp;

I need a sample script which convert data with delimiters and without compromising column headings width , no page breaks.

Thanks




Re: Data Pulling [message #349981 is a reply to message #349962] Tue, 23 September 2008 11:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
I connect to customer database and pull the data and anlayze the data (some times thousands of records) for errors.

Bad idea, you should do this inside the database and not pull the data to the client.

Quote:
I need a sample script which convert data with delimiters and without compromising column headings width , no page breaks.

set colsep ';'
set pagesize 50000

Regards
Michel
Re: Data Pulling [message #350332 is a reply to message #349962] Wed, 24 September 2008 14:47 Go to previous messageGo to next message
Kevin Meade
Messages: 2103
Registered: December 1999
Location: Connecticut USA
Senior Member
Michel is right as usual.

If you really are tired of doing it the old way, then write yourself a piece of code (procedure, function, operator, object) that does the work inside the database.

Good luck, Kevin
Re: Data Pulling [message #350579 is a reply to message #349962] Thu, 25 September 2008 08:26 Go to previous message
msmallya
Messages: 66
Registered: March 2008
Location: AHMEDABAD, GUJARAT
Member
Hi,

You can directly pull the data in excel using DSN. excel->data->get external data->new database query->data source->cancel->cancel->sql->type your query->ok->back to excel sheet

Thanx and Regards,

MSMallya
Previous Topic: table UPDATE with ANALYTIC function
Next Topic: Row value as column name
Goto Forum:
  


Current Time: Fri Feb 07 18:09:22 CST 2025