1751954 Members
4612 Online
108783 Solutions
New Discussion юеВ

Re: SQL script needed

 
SOLVED
Go to solution
Ionut Grigorescu_2
Super Advisor

SQL script needed

Hi all,

I'm running an ORACLE8 on a HPUX machine and I have a table with 80 objects. I need to compare the values of these objects before and after I perform some tests. The problem is, when I perform a "select" sql query for * (all the objects) the result is a mess - I cannot read the values under the corresponding object. I have tried with several linesizes - it doesn't work. Can somebody help me to retrieve some valuable information from my table?

Best regards,
john
If it weren't for STRESS I'd have no energy at all
9 REPLIES 9
Ionut Grigorescu_2
Super Advisor

Re: SQL script needed

...and this is my table.
If it weren't for STRESS I'd have no energy at all
John Strang
Regular Advisor

Re: SQL script needed

Hi,

Can you read the values if you select just one or two columns from the table?

It might be worth using the FORMAT command to ensure the output is formatted neatly.

Example
column A format 999,999
select INT_ID as A from p_nbsc_packet_control_unit

That would ensure that every value from column INT_ID would be shown in the specified format.

Hope this helps a little,

John
If you never make a mistake you'll never make anything.
Petr Simik
Occasional Contributor

Re: SQL script needed

For this purposes I use ODBC and windows client for example MS_QUERY or FROG or MS Excel or any other client. Than you can compare the lines easily.

My unix tip - is only to open the terminal make the font size small, than resize and try set LINE_SIZE in oracle.

Oleg Khoroshylov
Frequent Advisor

Re: SQL script needed

John,

What is your settings for WRAP ? If it's ON try to set to OFF with SET WRAP OFF command.

Best regards,
OK
No RISC, no fun
Ionut Grigorescu_2
Super Advisor

Re: SQL script needed

if I set wrap to off the lines will be truncated..
If it weren't for STRESS I'd have no energy at all
Petr Simik
Occasional Contributor

Re: SQL script needed

sorry for confusing I mean T.O.A.D tool not frog. It was a silly note. You can download this tool from
http://www.toadsoft.com/
it is 2MB freeware and exactly solve your problem.It uses sqlnet, you don't need to install anything else.
Oleg Khoroshylov
Frequent Advisor

Re: SQL script needed

They will be truncuted to the value of linesize. What is your current linesize ? Try to make it very big, 10000 for example
No RISC, no fun
Jean-Luc Oudart
Honored Contributor
Solution

Re: SQL script needed

John,

what about the attached script
Not the most recent but does the trick :
1) generate SQL script to extract data and format it as for a load (sqlloader)
2) generate the control file for the loader, but you won't need it in your case

Therefore, run the 1st SQL to generate your extract SQL script.
run you extract before your test
run your extract after your test
diff the 2 files

hope this help
Jean-Luc
Note : you can amend the generated script to sort the output on a specific order.
fiat lux
Ionut Grigorescu_2
Super Advisor

Re: SQL script needed

Merci, Jean

I have to understand what to change in your script to adapt it to my needs. But this was what I looked for.

case closed
If it weren't for STRESS I'd have no energy at all