Thursday, May 19, 2011

SQL*Loader

How to avoid loading the Header (first Record) of a flat/data file?


Include the following code as part of your control file:-
OPTIONS SKIP=1


How to avoid loading the Trailer (last record) of a flat/data file?


This can be achieved by making use of WHEN condition in control file, provided the trailer contains fixed data.


For Example, if the trailer contains 'T' in the firstcolumn then:- 
LOAD DATA 
INFILE 'test.txt' 
APPEND 
INTO TABLE xxcustom_table 
WHEN (01) <> 'T' 

   column1 ,
   column2 ,
   column3
   .....
)

Monday, May 9, 2011

Common Errors in Oracle Reports

Below are some of the common errors while working on oracle reports


REP-1219: 'M_BATCHES_EXP' has no size -- length or width is zero.
Cause:  In creating your layout, you created a layout object that has its Width and/or Height set to zero.
Action: In the property sheet for the object, enter a value for Width and/or Height


REP-1249: Column 'CF_1' has no PL/SQL formula.
Cause:  You created a column of Type Formula with nothing in the Formula field.
Action: Create a formula for the column or change the column's Type.


REP-1517: Column 'B_ENTERED_TOT_DR_DSP' references column 'Currency_Code', which has incompatible frequency.


REP-1401: 'r_entered_tot_cr_dspformula': Fatal PL/SQL error occurred.
ORA-06502: PL/SQL: numeric or value error


REP-1213: Field 'F_BAT_22' references column 'B_TOT_DR_DSP' at a frequency below its group.


REP-1814: Report cannot be formatted. Object 'horizontally' can never fit within 'F_BATCH_POSTED_DATE1'


REP-1212: Object 'Margin' is not fully enclosed by its enclosing object 'SET_OF_BOOKS_NAME'.