Posts

Showing posts from 2022

Timestamp with milli/micro/nano seconds

Image
As part of performance and run time of a query or a function we might need to capture time in milli/micro/ nano seconds. Below snippets would help in such scenarios: By default  localtimestamp will give upto 6 decimal places of a sec. to get nano sec upto 9 decimal use  localtimestamp(9) declare l_starttime timestamp(9); l_endtime timestamp(9); l_count number:=0; l_Diff number:=0; begin select localtimestamp(9) into l_starttime from dual;  dbms_output.put_line('Start Time: ' || l_starttime);   select count(*) into l_count from PO_line_locations_all pll, po_headers_all PHA where pll.po_header_id = pha.po_header_id and exists (select 1 from po_requisition_lines_all prl,po_requisition_headers_all prh               where prl.requisition_header_id = prh.requisition_header_id                 and prl.blanket_po_header_id = pha.po_header_id) and pll.po_header_id = <enter header id>; select localtimestamp(9) into l_endtime from dual;  dbms_output.put_line('End Time: ' || l

Daily Dose of new words

unobtrusive  - Unremarkable, modest albeit - Even though, even if, although deepfake - images or videos generated using AI where they are hard to recognize the real vs AI generated images  

BI & XML reports

 Format to add barcodes to RTF templates XML Tag:  <?PART_NUMBER?> Barcode Tag:  <?format-barcode:PART_NUMBER;'code128a';'XMLPBarVendor'?> add below tag to the template as well:  <?register-barcode-vendor:’com.agilent.xdo.template.rtf.util.barcoder.BarcodeUtil’;'XMLPBarVendor'?> How to add new Barcode font to Oracle apps

Oracle Demantra Basics

Image
 How I learnt Oracle Demantra Basics What it Does? Real Time sales & Operation Planning  Causal analysis, Seasonal & cyclic events, trend analysis Demantra tables  Staging Tables select * from t_src_item_tmpl; select * from t_src_sales_tmpl; select  * from t_src_loc_tmpl; Base tables select * from sales_data;--sales order historical data select * from mdp_matrix;--combination data select * from inputs;--time buckets select * from queries;--worksheets select * from items;--items Select * from t_ep_item; select * from location;--locations Integration interface select * from transfer_query; Patch select * from version_details_history; Workflow select * from wf_schemas; select * from wf_process_log; Select * from group_tables;

ORA Errors

Image
***ORA ERROR NUMBERS & FIX** Error: ORA-00917: missing comma for an INSERT statement. Fix: additional ( ' ) is present in the data which might interfere with the string being inserted. ex: SPANISH USER' S to be replaced with SPANISH USERS Error: ORA-06512: Indicates the line number at which the unhandled error occurred. Fix Use DBMS_UTILITY.format_error_backtrace ex: FND_FILE.PUT_LINE(FND_FILE.log, DBMS_UTILITY.format_error_backtrace); Error: ORA-02251: Sub-Query not allowed in here --(in triggers) Fix: Use CASE and EXISTS in select statement to capture value and validate with IF condition example: Error: ora-24345 in value set used in DFF Fix: increase the length of the column in value set definition API Error: ONTOE_INVALID_ATTRIBUTENATTRIBUTEShipping Method1.ONTOE_INVALID_ATTRIBUTENATTRIBUTEShipping Method Fix: Use correct ship Method Code as input to API. Not ship method meaning. API Error: ONTOE_SCH_OVER_ATP_NO_AUTH_MOD1.ONTOE_SCH_OVER_ATP_NO_AUTH_MOD Fix: Make sure