Tuesday, 19 May 2015

How to print certain string based on the value in oracle


Requirement:- I want to Print the text Senior Manager when the text is Senior Manager. Division No:7

Solution:- select SUBSTR(NAME,0,INSTR(NAME,'.')-1) JOB from per_jobs

Output:-JOB

Deputy General Manager
Deputy Manager
General Manager
Manager
Managing Director
Senior Manager

Monday, 18 May 2015

How to change the date format as DD-MON-YYYY, when you are passing as parameter and printing in the output


How to change the date format as DD-MON-YYYY, when you are passing as parameter and printing in the output in XML PUBLISHER or BI PUBLISHER.

Requirement:- I want the date format to be printed as DD-MON-YYYY in the output. But the date is a parameter and  there is no database column for this one.

In the output the date was printing like this:
2015-01-01T00:00:00.000+05:30

I want this to be printed as 01-JAN-2015

When I use <?xdofx:to_char(trunc(P_FROM_DATE),'DD-MON-YYYY')?>
it was coming as 31-Dec-2014
that means - 1 date.

Solution:- The solution for this is:

<?format-date:P_FROM_DATE;'dd-MMM-yyyy';'Asia/Calcutta'?>

By using the above xml tag, I am able to print the date as 01-Jan-2015.

I got the solution in this way, I am happy if it helps to anyone by seeing my post.

Uploading PO Attachments from EBS to FTP Server

 create or replace PROCEDURE xx_upload_po_attachment(errbuff out varchar2, retcode out number)  IS CURSOR cur_new_attmt IS    select ponumbe...