Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Advanced books wanted
General Fear (richmarin_at_earthlink.net) wrote:
: 2.) Debug. Is there a source of information that shows how to go about
: debugging SQL code?
When writing reports
Use joins.
Select (i.e. display) all columns used in the where clauses.
Arange where clauses so that join conditions come first,
followed by general filtering,
followed by specific filtering (e.g. ID=desired_record)
This allows you to easily cut/paste the report query into sqlplus (or
whatever) and test it.
- copy up to and include the join conditions and you see all the data
including the join condition data, allowing you to confirm logic
is correct.
- copy thru the general filtering and you see all the data that could
be used in the report, allowing you to find parameters that will
produce output to test the report
$0.10 Received on Thu Jun 21 2007 - 14:24:27 CDT