Friday, November 17, 2017

Date parameter in Standed Date in app

<?xdofx:to_date(replace(substr(P_FROM_DATE,1,10),’/’,’-’)||’T00:00:00.000-06:00’,'DD-MON-YYYY')?>

Tuesday, November 14, 2017

To Get text from Data source

select *
from user_source
where upper(text) like upper('%Enter_text_hear%');

Wednesday, November 8, 2017

Set Views in Obiee

BEGIN
  GLR03300_PKG.set_criteria (to_number(NULL),to_number(NULL),to_number(NULL),to_number(NULL),to_number(NULL), 'ALL123456789012345',NULL,NULL,NULL,'A',to_number(NULL), NULL,'ALL123456789012345');
END;

Tags in rtf

<?format-date:DUEBY_DT;’DD-MM-YYYY’?>  ---DATE FORMATE
<?xdofx:substr(DUEBY_DT,1,10)?>         --SUBSTRING
<?format-number:T_BILLABLE_HOURS;'999G999D999'?>  --decimal

Tuesday, November 7, 2017

Cursors

DECLARE
  v_ename VARCHAR2(300):=NULL;
  v_job   VARCHAR2(300):=NULL;
BEGIN
  BEGIN
    SELECT ename
    INTO v_ename
    FROM emp
    WHERE empno='7839';
    /* Implicit Cursor with one row*/
    dbms_output.put_line('Implicit Cursor one row : '||v_ename);
  END;
  BEGIN
    FOR i IN
    (SELECT ename,JOB FROM emp WHERE empno IN ('7839','7698')
    )
    /* Explicit Cursor  */
    LOOP
      dbms_output.put_line(' Explicit Cursor retving more then on row ---->'||i.ename||'          '||i.job);
      FOR j IN
      (SELECT ename,JOB FROM emp WHERE ename=i.ename AND JOB=i.JOB
      )
      LOOP
        dbms_output.put_line(' Passing i values in j cursor retving more then on row ---->'||j.ename||'          '||j.JOB);
      END LOOP;
    END LOOP;
  END;
  BEGIN
    SELECT ename INTO v_ename FROM emp;
    /* Implicit Cursor */
    dbms_output.put_line('Implicit Cursor : '||v_ename);
  END;
EXCEPTION
WHEN too_many_rows THEN
  dbms_output.put_line('v_ename Implicit Cursor return Too many Rows');
END;