Sql  functions in Pl/Sql region not working

Hi all,
I have created a pl/sql region like this
This is the example taken from denes kubicek
DECLARE
   v_counter     INTEGER         := 0;
   v_line        VARCHAR2 (4000);
   v_rec_in_row  INTEGER         := 6;
BEGIN
   HTP.prn ('<table>');
   HTP.prn ('<tr>');
   HTP.prn ('<td>');
   FOR c IN
      (SELECT CASE
                 WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'doc'
                    THEN    '<table>'
                         || '<tr><td><img src="#WORKSPACE_IMAGES#user_green_locked.gif"/></td></tr>'
                         || '<tr><td style="text-align:center">'
                         || SUBSTR(NAME,INSTR(NAME,'/')+1)  name
                         || '</td></tr></table>'
                 WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'xls'
                    THEN    '<table>'
                         || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                         || '<tr><td style="text-align:center">'
                         || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                         || '</td></tr></table>'
                WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'ppt'
                    THEN    '<table>'
                         || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                         || '<tr><td style="text-align:center">'
                         || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                         || '</td></tr></table>'
               WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'txt'
                    THEN    '<table>'
                         || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                         || '<tr><td style="text-align:center">'
                         || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                         || '</td></tr></table>'
               WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'gif'
                    THEN    '<table>'
                         || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                         || '<tr><td style="text-align:center">'
                         || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                         || '</td></tr></table>'
                 ELSE    '<table>'
                      || '<tr><td><img src="#WORKSPACE_IMAGES#user_red.gif"/></td></tr>'
                      || '<tr><td style="text-align:center">'
                      || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                      || '</td></tr></table>'
              END doc
         FROM con_doc_info)
   LOOP
      v_line := v_line || c.doc || '</td><td>';
      v_counter := v_counter + 1;
      IF v_counter = v_rec_in_row
      THEN
         HTP.prn (v_line);
         HTP.prn ('</td></tr><tr><td>');
         v_line := NULL;
         v_counter := 0;
      END IF;
   END LOOP;
   HTP.prn (v_line);
   HTP.prn ('</td></tr></table>');
END;but the functions are not working?
Any idea ? Please help me

Hi fac
Database version is 10g
This sample code is working
DECLARE
   v_counter     INTEGER         := 0;
   v_line        VARCHAR2 (4000);
   v_rec_in_row  INTEGER         := 6;
BEGIN
   HTP.prn ('<table>');
   HTP.prn ('<tr>');
   HTP.prn ('<td>');
   FOR c IN
      (SELECT CASE
                 WHEN deptno = 20
                    THEN    '<table>'
                         || '<tr><td><img src="#WORKSPACE_IMAGES#user_green_locked.gif"/></td></tr>'
                         || '<tr><td style="text-align:center">'
                         || ename
                         || '</td></tr></table>'
                 WHEN deptno = 30
                    THEN    '<table>'
                         || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                         || '<tr><td style="text-align:center">'
                         || ename
                         || '</td></tr></table>'
                 ELSE    '<table>'
                      || '<tr><td><img src="#WORKSPACE_IMAGES#user_red.gif"/></td></tr>'
                      || '<tr><td style="text-align:center">'
                      || ename
                      || '</td></tr></table>'
              END emp
         FROM emp)
   LOOP
      v_line := v_line || c.emp || '</td><td>';
      v_counter := v_counter + 1;
      IF v_counter = v_rec_in_row
      THEN
         HTP.prn (v_line);
         HTP.prn ('</td></tr><tr><td>');
         v_line := NULL;
         v_counter := 0;
      END IF;
   END LOOP;
   HTP.prn (v_line);
   HTP.prn ('</td></tr></table>');
END;This code is working good images are displayed as per the deptno.
I need to display images for the documents which i have uploaded and stored in a file
I am taking the name and in that last three letters alone and according to that pictures should appear
My previous code while running no output is there.
Hope I am more clear now
bye
Srikavi

Similar Messages

  • Region source (PL/SQL function body returning SQL query)

    Hi, guys.
    Here is what i try to do:
    Create a region of type SQL Query (PL/SQL function body returning SQL query). In the source area i tried to put this:
    DECLARE
    v_new VARCHAR2(10);
    v_SQL varchar2(32000);
    BEGIN
    v_new := :P102_HDN_NEW;
    -- htp.p(v_new);
    IF v_new = 'N-Set' THEN
    v_SQL := 'select ' ||
    ELSIF v_new = 'Y-Set' THEN
    v_SQL := 'select ' ||
    END IF;
    RETURN v_SQL;
    END;
    And here is the reply from APEX:
    1 error has occurred
    Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. The query can not be parsed, the cursor is not yet open or a function returning a SQL query returned without a value.
    Now.
    1. Variable is set with the right value.
    2. Each statement (separately) returns SQL that works with no problems
    3. Problem occures if i try to put IF statement around the SQL creation.
    4. If i select "Use Generic Column Names (parse query at runtime only)" instead of "Use Query-Specific Column Names and Validate Query" then the script returns SQL properly, however report's column names are set to Col1, Col2,Col3 ......
    Thnks in advence
    Mike

    OK. Here is enire statement:
    DECLARE
    v_new VARCHAR2(10);
    v_SQL varchar2(32000);
    BEGIN
    v_new := :P102_HDN_NEW;
    htp.p(v_new);
    IF v_new = 'N-Set' THEN
    v_SQL := 'select ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(10,c.sdescr) descr, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(12,DECODE(ld.level,''All'', ''All Categories'',ld.level)) level, ' ||
    'apex_item.checkbox(1, ld.opt_in_auto_flag, decode(ld.opt_in_auto_flag,NULL,''disabled'',''Y'',''checked'')) auto_in, ' ||
    'apex_item.checkbox(2, ld.opt_in_manual_flag, decode(ld.opt_in_manual_flag,NULL,''disabled'',''Y'',''checked'')) manual_in, ' ||
    'apex_item.checkbox(3, ld.opt_out_auto_flag, decode(ld.opt_out_auto_flag,NULL,''disabled'',''Y'',''checked'')) auto_out, ' ||
    'apex_item.checkbox(4, ld.opt_out_manual_flag, decode(ld.opt_out_manual_flag,NULL,''disabled'',''Y'',''checked'')) manual_out, ' ||
    'DECODE(c.code, ''NMBR'', NULL,''Change to '' || DECODE(ld.level,''All'',''Categories'',''All Categories'')) link_change, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(11,c.code) code ' ||
    'from ' ||
    'tbl1 c, ' ||
    'tbl2 ld ' ||
    'where c.code = ld.code ' ||
    'and c.type = ''TYPE1'' ' ||
    'and c.active = ''Y'' ' ||
    'order by c.sorting ';
    ELSIF v_new = 'Y-Set' THEN
    v_SQL := 'select ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(10,c.sdescr) descr, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(12,''All Categories'') level, ' ||
    'apex_item.checkbox(1, c.option_1, decode(c.option_1,NULL,''disabled'',''Y'',''checked'')) auto_in, ' ||
    'apex_item.checkbox(2, c.option_3, decode(c.option_3,NULL,''disabled'',''Y'',''checked'')) manual_in, ' ||
    'apex_item.checkbox(3, c.option_2, decode(c.option_2,NULL,''disabled'',''Y'',''checked'')) auto_out, ' ||
    'apex_item.checkbox(4, c.option_4, decode(c.option_4,NULL,''disabled'',''Y'',''checked'')) manual_out, ' ||
    'DECODE(c.code, ''AAA'', NULL,''Options by AAA'') link_change, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(11,c.code) code ' ||
    'from ' ||
    'tbl1 c ' ||
    'where 1 = 1 ' ||
    'and c.type = ''TYPE1'' ' ||
    'and c.active = ''Y'' ' ||
    'order by c.sorting ';
    END IF;
    RETURN v_SQL;
    END;
    If i put just this
    DECLARE
    v_new VARCHAR2(10);
    v_SQL varchar2(32000);
    BEGIN
    v_new := :P102_HDN_NEW;
    htp.p(v_new);
    v_SQL := 'select ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(10,c.sdescr) descr, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(12,DECODE(ld.level,''All'', ''All Categories'',ld.level)) level, ' ||
    'apex_item.checkbox(1, ld.opt_in_auto_flag, decode(ld.opt_in_auto_flag,NULL,''disabled'',''Y'',''checked'')) auto_in, ' ||
    'apex_item.checkbox(2, ld.opt_in_manual_flag, decode(ld.opt_in_manual_flag,NULL,''disabled'',''Y'',''checked'')) manual_in, ' ||
    'apex_item.checkbox(3, ld.opt_out_auto_flag, decode(ld.opt_out_auto_flag,NULL,''disabled'',''Y'',''checked'')) auto_out, ' ||
    'apex_item.checkbox(4, ld.opt_out_manual_flag, decode(ld.opt_out_manual_flag,NULL,''disabled'',''Y'',''checked'')) manual_out, ' ||
    'DECODE(c.code, ''NMBR'', NULL,''Change to '' || DECODE(ld.level,''All'',''Categories'',''All Categories'')) link_change, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(11,c.code) code ' ||
    'from ' ||
    'tbl1 c, ' ||
    'tbl2 ld ' ||
    'where c.code = ld.code ' ||
    'and c.type = ''TYPE1'' ' ||
    'and c.active = ''Y'' ' ||
    'order by c.sorting ';
    RETURN v_SQL;
    END;
    it works fune...

  • ORA-00604: error at recursive sql level 1ORA-01882: timezone region not fou

    hello eveyone i have installed SQL developer and try to create a connexion but it shows the following error:
    " : ORA-00604: error at recursive sql level 1ORA-01882: timezone region not found"
    (i choosed TNS as connexion type , default as rol )
    plz help
    thanks

    Hi Raccio,
    Using the forum search functionality, I came across the following threads with some tips that might help you:
    ORA-00604 & ORA-01804 when connecting to Oracle 11 database 11.1.0.6.0
    ora-01882 "timezone region not found" with 3.0.03.97 but not with 3.0.03.45
    Regards,
    Gary Graham
    SQL Developer Team
    Edited by: gggraham on Jul 20, 2011 1:03 PM

  • Java.sql.SQLDataException: ORA-01882: timezone region  not found

    i am new in jdeveloper 11g.i using jdeveloper 11g version. Studio Edition Version 11.1.1.0.0 Build JDEVADF_MAIN.BOXER_GENERIC_081002.2127.5156 Studio Edition Version 11.1.1.0.0
    Firefox3 - 3.0.3 os : fedora 9 -- Linux myname 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686 i686 i386 GNU/Linux
    java version : usr/java/jdk1.6.0_06
    following running default server log
    ==============================
    [48] BC4J Property AppModuleJndiName='sc.wadia.model.AppModule' -->(SessionImpl) from Client Environment
    [49] Skipping empty Property java.naming.security.principal from System Default
    [50] Skipping empty Property java.naming.security.credentials from System Default
    [51] Skipping empty Property jbo.user.principal from System Default
    [52] BC4J Property jbo.simulate.remote='false' -->(SessionImpl) from System Default
    [53] BC4J Property jbo.security.context='oracle.security.jazn' -->(MetaObjectManager) from System Default
    [54] Skipping empty Property jbo.object.marshaller from System Default
    [55] BC4J Property jbo.use.pers.coll='false' -->(SessionImpl) from System Default
    [56] BC4J Property jbo.pers.max.rows.per.node='70' -->(SessionImpl) from System Default
    [57] BC4J Property jbo.pers.max.active.nodes='30' -->(SessionImpl) from System Default
    [58] BC4J Property jbo.validation.threshold='10' -->(SessionImpl) from System Default
    [59] Skipping empty Property jbo.pcoll.mgr from System Default
    [60] BC4J Property jbo.txn_table_name='PS_TXN' -->(SessionImpl) from System Default
    [61] BC4J Property jbo.txn_seq_name='PS_TXN_seq' -->(SessionImpl) from System Default
    [62] BC4J Property jbo.txn_seq_inc='50' -->(SessionImpl) from System Default
    [63] BC4J Property jbo.control_table_name='PCOLL_CONTROL' -->(MetaObjectManager) from System Default
    [64] BC4J Property jbo.stringmanager.factory.class='use_default' -->(SessionImpl) from System Default
    [65] BC4J Property jbo.domain.date.suppress_zero_time='true' -->(MetaObjectManager) from System Default
    [66] BC4J Property jbo.domain.bind_sql_date='true' -->(MetaObjectManager) from System Default
    [67] BC4J Property jbo.domain.string.as.bytes.for.raw='false' -->(MetaObjectManager) from System Default
    [68] BC4J Property jbo.fetch.mode='AS.NEEDED' -->(MetaObjectManager) from System Default
    [69] BC4J Property jbo.323.compatible='false' -->(MetaObjectManager) from System Default
    [70] BC4J Property jbo.903.compatible='false' -->(MetaObjectManager) from System Default
    [71] Skipping empty Property JBODynamicObjectsPackage from System Default
    [72] BC4J Property MetaObjectContextFactory='oracle.jbo.mom.xml.DefaultMomContextFactory' -->(MetaObjectManager) from System Default
    [73] BC4J Property jbo.load.components.lazily='false' -->(MetaObjectManager) from System Default
    [74] BC4J Property MetaObjectContext='oracle.jbo.mom.xml.XMLContextImpl' -->(MetaObjectManager) from System Default
    [75] BC4J Property java.naming.factory.initial='oracle.jbo.common.JboInitialContextFactory' -->(SessionImpl) from Client Environment
    [76] BC4J Property IsLazyLoadingTrue='true' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [77] BC4J Property oracle.jbo.usemds='true' -->(MetaObjectManager) from System Default
    [78] BC4J Property oracle.adfm.usemds='true' -->(MetaObjectManager) from System Default
    [79] BC4J Property ActivateSharedDataHandle='false' -->(MetaObjectManager) from System Default
    [80] Skipping empty Property HandleName from System Default
    [81] Skipping empty Property Factory-Substitution-List from System Default
    [82] BC4J Property jbo.project='sc.wadia.model.Model' -->(Configuration) from Client Environment
    [83] BC4J Property jbo.max.cursors='50' -->(MetaObjectManager) from System Default
    [84] WARNING: Property jbo.dofailoverset to null
    [85] Skipping empty Property jbo.dofailover from null
    [86] WARNING: Property jbo.envinfoproviderset to null
    [87] Skipping empty Property jbo.envinfoprovider from null
    [88] BC4J Property jbo.rowid_am_conn_name='ROWIDAM_DB' -->(MetaObjectManager) from System Default
    [89] WARNING: Property jbo.ampool.writecookietoclientset to null
    [90] Skipping empty Property jbo.ampool.writecookietoclient from null
    [91] WARNING: Property jbo.doconnectionpoolingset to null
    [92] Skipping empty Property jbo.doconnectionpooling from null
    [93] WARNING: Property jbo.recyclethresholdset to null
    [94] Skipping empty Property jbo.recyclethreshold from null
    [95] WARNING: Property jbo.ampool.dynamicjdbccredentialsset to null
    [96] Skipping empty Property jbo.ampool.dynamicjdbccredentials from null
    [97] BC4J Property jbo.ampool.resetnontransactionalstate='true' -->(SessionImpl) from System Default
    [98] WARNING: Property jbo.ampool.sessioncookiefactoryclassset to null
    [99] Skipping empty Property jbo.ampool.sessioncookiefactoryclass from null
    [100] WARNING: Property jbo.ampool.connectionstrategyclassset to null
    [101] Skipping empty Property jbo.ampool.connectionstrategyclass from null
    [102] WARNING: Property jbo.ampool.maxpoolsizeset to null
    [103] Skipping empty Property jbo.ampool.maxpoolsize from null
    [104] WARNING: Property jbo.ampool.initpoolsizeset to null
    [105] Skipping empty Property jbo.ampool.initpoolsize from null
    [106] WARNING: Property jbo.ampool.monitorsleepintervalset to null
    [107] Skipping empty Property jbo.ampool.monitorsleepinterval from null
    [108] WARNING: Property jbo.ampool.minavailablesizeset to null
    [109] Skipping empty Property jbo.ampool.minavailablesize from null
    [110] WARNING: Property jbo.ampool.maxavailablesizeset to null
    [111] Skipping empty Property jbo.ampool.maxavailablesize from null
    [112] WARNING: Property jbo.ampool.maxinactiveageset to null
    [113] Skipping empty Property jbo.ampool.maxinactiveage from null
    [114] WARNING: Property jbo.ampool.timetoliveset to null
    [115] Skipping empty Property jbo.ampool.timetolive from null
    [116] WARNING: Property jbo.ampool.doampoolingset to null
    [117] Skipping empty Property jbo.ampool.doampooling from null
    [118] WARNING: Property jbo.ampool.issupportspassivationset to null
    [119] Skipping empty Property jbo.ampool.issupportspassivation from null
    [120] WARNING: Property jbo.ampool.isuseexclusiveset to null
    [121] Skipping empty Property jbo.ampool.isuseexclusive from null
    [122] BC4J Property jbo.passivationstore='null' -->(MetaObjectManager) from System Default
    [123] BC4J Property jbo.saveforlater='false' -->(SessionImpl) from System Default
    [124] BC4J Property jbo.snapshotstore.undo='persistent' -->(SessionImpl) from System Default
    [125] BC4J Property jbo.maxpassivationstacksize='10' -->(SessionImpl) from System Default
    [126] BC4J Property jbo.txn.handleafterpostexc='false' -->(SessionImpl) from System Default
    [127] BC4J Property jbo.connectfailover='true' -->(SessionImpl) from System Default
    [128] WARNING: Property jbo.maxpoolcookieageset to null
    [129] Skipping empty Property jbo.maxpoolcookieage from null
    [130] WARNING: Property PoolClassNameset to null
    [131] Skipping empty Property PoolClassName from null
    [132] BC4J Property jbo.maxpoolsize='4096' -->(MetaObjectManager) from System Default
    [133] BC4J Property jbo.initpoolsize='0' -->(MetaObjectManager) from System Default
    [134] BC4J Property jbo.poolrequesttimeout='30000' -->(MetaObjectManager) from System Default
    [135] BC4J Property jbo.poolmonitorsleepinterval='600000' -->(MetaObjectManager) from System Default
    [136] BC4J Property jbo.poolminavailablesize='5' -->(MetaObjectManager) from System Default
    [137] BC4J Property jbo.poolmaxavailablesize='25' -->(MetaObjectManager) from System Default
    [138] BC4J Property jbo.poolmaxinactiveage='600000' -->(MetaObjectManager) from System Default
    [139] BC4J Property jbo.pooltimetolive='-1' -->(MetaObjectManager) from System Default
    [140] BC4J Property RELEASE_MODE='Stateful' -->(MetaObjectManager) from System Default
    [141] BC4J Property jbo.assoc.consistent='true' -->(MetaObjectManager) from System Default
    [142] BC4J Property jbo.viewlink.consistent='DEFAULT' -->(MetaObjectManager) from System Default
    [143] BC4J Property jbo.passivation.TrackInsert='true' -->(MetaObjectManager) from System Default
    [144] Skipping empty Property jbo.ViewCriteriaAdapter from System Default
    [145] BC4J Property jbo.SQLBuilder='Oracle' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [146] BC4J Property jbo.ConnectionPoolManager='oracle.jbo.server.ConnectionPoolManagerImpl' -->(MetaObjectManager) from System Default
    [147] BC4J Property jbo.TypeMapEntries='Oracle' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [148] Skipping empty Property jbo.sql92.JdbcDriverClass from System Default
    [149] BC4J Property jbo.sql92.LockTrailer='FOR UPDATE' -->(MetaObjectManager) from System Default
    [150] BC4J Property jbo.jdbc.trace='false' -->(MetaObjectManager) from System Default
    [151] BC4J Property jbo.abstract.base.check='true' -->(MetaObjectManager) from System Default
    [152] BC4J Property jbo.assoc.where.early.set='false' -->(MetaObjectManager) from System Default
    [153] BC4J Property jbo.sql92.DbTimeQuery='select sysdate from dual' -->(MetaObjectManager) from System Default
    [154] BC4J Property oracle.jbo.defineColumnLength='skipDefines' -->(MetaObjectManager) from System Default
    [155] BC4J Property jbo.jdbc_bytes_conversion='jdbc' -->(MetaObjectManager) from System Default
    [156] Skipping empty Property jbo.tmpdir from System Default
    [157] Skipping empty Property jbo.server.internal_connection from System Default
    [158] BC4J Property SessionClass='oracle.jbo.server.SessionImpl' -->(SessionImpl) from System Default
    [159] Skipping empty Property TransactionFactory from System Default
    [160] Skipping empty Property jbo.def.mgr.listener from System Default
    [161] Skipping empty Property jbo.use.global.sub.map from System Default
    [162] BC4J Property jbo.debugoutput='console' -->(Diagnostic) from System Property
    [163] BC4J Property jbo.debug.prefix='DBG: ' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [164] BC4J Property jbo.logging.show.timing='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [165] BC4J Property jbo.logging.show.function='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [166] BC4J Property jbo.logging.show.level='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [167] BC4J Property jbo.logging.show.linecount='true' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [168] BC4J Property jbo.logging.trace.threshold='6' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [169] BC4J Property jbo.jdbc.driver.verbose='false' -->(Diagnostic) from System Default
    [170] BC4J Property oracle.home='/u01/app/oracle/middleware/jdeveloper' -->(Diagnostic) from System Property
    [171] Skipping empty Property oc4j.name from System Default
    [172] BC4J Property jbo.ejb.txntimeout='1830' -->(SessionImpl) from System Default
    [173] BC4J Property jbo.ejb.txntype='local' -->(SessionImpl) from System Default
    [174] BC4J Property jbo.ejb.txn.disconnect_on_completion='false' -->(SessionImpl) from System Default
    [175] BC4J Property jbo.ejb.useampool='false' -->(SessionImpl) from Client Environment
    [176] Skipping empty Property oracle.jbo.schema from System Default
    [177] BC4J Property jbo.xml.validation='false' -->(MetaObjectManager) from System Default
    [178] BC4J Property ord.RetrievePath='ordDeliverMedia' -->(MetaObjectManager) from System Default
    [179] BC4J Property ord.HttpMaxMemory='102400' -->(MetaObjectManager) from System Default
    [180] Skipping empty Property ord.HttpTempDir from System Default
    [181] BC4J Property ord.wmp.classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' -->(MetaObjectManager) from System Default
    [182] BC4J Property ord.qp.classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' -->(MetaObjectManager) from System Default
    [183] BC4J Property ord.rp.classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' -->(MetaObjectManager) from System Default
    [184] BC4J Property ord.wmp.codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' -->(MetaObjectManager) from System Default
    [185] BC4J Property ord.qp.codebase='http://www.apple.com/qtactivex/qtplugin.cab' -->(MetaObjectManager) from System Default
    [186] Skipping empty Property ord.rp.codebase from System Default
    [187] BC4J Property ord.wmp.plugins.page='http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&' -->(MetaObjectManager) from System Default
    [188] BC4J Property ord.qp.plugins.page='http://www.apple.com/quicktime/download/' -->(MetaObjectManager) from System Default
    [189] BC4J Property ord.rp.plugins.page='http://www.real.com/player/' -->(MetaObjectManager) from System Default
    [190] BC4J Property jbo.security.enforce='None' -->(SessionImpl) from System Default
    [191] BC4J Property jbo.security.loginmodule='oracle.security.jazn.oc4j.JAZNUserManager' -->(SessionImpl) from System Default
    [192] Skipping empty Property jbo.security.config from System Default
    [193] BC4J Property jbo.server.useNullDbTransaction='false' -->(SessionImpl) from System Default
    [194] BC4J Property jbo.domain.reopenblobstream='false' -->(MetaObjectManager) from System Default
    [195] BC4J Property jbo.server.retainAssocAccessor='false' -->(SessionImpl) from System Default
    [196] BC4J Property oracle.adfm.DefaultEventPolicy='NONE' -->(MetaObjectManager) from System Default
    [197] Copying unknown Client property (DBconnection='jdbc:oracle:thin:@localhost:1521:DB10G') to session
    [198] Copying unknown Client property (jbo.timezone='+05:30') to session
    [199] Copying unknown Client property (password='*****') to session
    [200] Copying unknown Client property (JDBCName='wadia') to session
    [201] Copying unknown Client property (jbo.jndi.use_default_context='true') to session
    [202] Copying unknown Client property (user='wadia') to session
    [203] Copying unknown Client property (name='AppModuleLocal') to session
    [204] Copying unknown Client property (jbo.applicationmoduleclassname='sc.wadia.model.AppModule') to session
    [205] Copying unknown Client property (java.naming.factory.url.pkgs='weblogic.jndi.factories:weblogic.corba.j2ee.naming.url:weblogic.jndi.factories:weblogic.corba.j2ee.naming.url') to session
    [206] Copying unknown Client property (ApplicationName='sc.wadia.model.AppModule') to session
    [207] WARNING: Unused property: java.vm.version='10.0-b22' found in System Property
    [208] WARNING: Unused property: java.vendor.url='http://java.sun.com/' found in System Property
    [209] WARNING: Unused property: oracle.dms.context='OFF' found in System Property
    [210] WARNING: Unused property: weblogic.Name='DefaultServer' found in System Property
    [211] WARNING: Unused property: wls.home='/u01/app/oracle/middleware/wlserver_10.3/server' found in System Property
    [212] WARNING: Unused property: java.awt.printerjob='sun.print.PSPrinterJob' found in System Property
    [213] WARNING: Unused property: javax.rmi.CORBA.UtilClass='weblogic.iiop.UtilDelegateImpl' found in System Property
    [214] WARNING: Unused property: wlw.iterativeDev='' found in System Property
    [215] WARNING: Unused property: java.vendor.url.bug='http://java.sun.com/cgi-bin/bugreport.cgi' found in System Property
    [216] WARNING: Unused property: line.separator='
    ' found in System Property
    [217] WARNING: Unused property: http.proxyPort='3128' found in System Property
    [218] WARNING: Unused property: weblogic.webservice.client.proxyusername='myname' found in System Property
    [219] WARNING: Unused property: proxyPort='3128' found in System Property
    [220] WARNING: Unused property: java.vm.vendor='Sun Microsystems Inc.' found in System Property
    [221] WARNING: Unused property: java.class.path=':/u01/app/oracle/middleware/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/app/oracle/middleware/patch_jdev1111/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/app/oracle/middleware/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/java/jdk1.6.0_06/lib/tools.jar:/u01/app/oracle/middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/u01/app/oracle/middleware/wlserver_10.3/server/lib/weblogic.jar:/u01/app/oracle/middleware/modules/features/weblogic.server.modules_10.3.0.0.jar:/u01/app/oracle/middleware/wlserver_10.3/server/lib/webservices.jar:/u01/app/oracle/middleware/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/u01/app/oracle/middleware/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:/u01/app/oracle/middleware/jdeveloper/modules/features/adf.share_11.1.1.jar::/u01/app/oracle/middleware/wlserver_10.3/common/eval/pointbase/lib/pbclient57.jar:/u01/app/oracle/middleware/wlserver_10.3/server/lib/xqrl.jar::' found in System Property
    [222] WARNING: Unused property: weblogic.webservice.client.proxypassword='safari' found in System Property
    [223] WARNING: Unused property: os.arch='i386' found in System Property
    [224] WARNING: Unused property: java.protocol.handler.pkgs='oracle.mds.net.protocol|weblogic.net|weblogic.utils|weblogic.utils|weblogic.utils' found in System Property
    [225] WARNING: Unused property: user.name='myname' found in System Property
    [226] WARNING: Unused property: sun.boot.class.path='/usr/java/jdk1.6.0_06/jre/lib/resources.jar:/usr/java/jdk1.6.0_06/jre/lib/rt.jar:/usr/java/jdk1.6.0_06/jre/lib/sunrsasign.jar:/usr/java/jdk1.6.0_06/jre/lib/jsse.jar:/usr/java/jdk1.6.0_06/jre/lib/jce.jar:/usr/java/jdk1.6.0_06/jre/lib/charsets.jar:/usr/java/jdk1.6.0_06/jre/classes' found in System Property
    [227] WARNING: Unused property: org.xml.sax.driver='weblogic.xml.jaxp.RegistryXMLReader' found in System Property
    [228] WARNING: Unused property: sun.cpu.endian='little' found in System Property
    [229] WARNING: Unused property: java.endorsed.dirs='/usr/java/jdk1.6.0_06/jre/lib/endorsed' found in System Property
    [230] WARNING: Unused property: vde.home='/home/myname/.jdeveloper/system11.1.1.0.31.51.56/DefaultDomain/servers/DefaultServer/data/ldap' found in System Property
    [231] WARNING: Unused property: com.sun.xml.ws.api.streaming.XMLStreamWriterFactory.woodstox='true' found in System Property
    [232] WARNING: Unused property: domain.home='/home/myname/.jdeveloper/system11.1.1.0.31.51.56/DefaultDomain' found in System Property
    [233] WARNING: Unused property: wlw.logErrorsToConsole='' found in System Property
    [234] WARNING: Unused property: https.proxyHost='192.147.1.129' found in System Property
    [235] WARNING: Unused property: https.proxyPort='3128' found in System Property
    [236] WARNING: Unused property: wlw.testConsole='' found in System Property
    [237] WARNING: Unused property: java.specification.vendor='Sun Microsystems Inc.' found in System Property
    [238] WARNING: Unused property: javax.xml.rpc.ServiceFactory='weblogic.webservice.core.rpc.ServiceFactoryImpl' found in System Property
    [239] WARNING: Unused property: oracle.core.ojdl.logging.componentId='DefaultServer' found in System Property
    [240] WARNING: Unused property: user.timezone='GMT+05:30' found in System Property
    [241] WARNING: Unused property: os.name='Linux' found in System Property
    [242] WARNING: Unused property: java.ext.dirs='/usr/java/jdk1.6.0_06/jre/lib/ext:/usr/java/packages/lib/ext' found in System Property
    [243] WARNING: Unused property: sun.arch.data.model='32' found in System Property
    [244] WARNING: Unused property: os.version='2.6.25-14.fc9.i686' found in System Property
    [245] WARNING: Unused property: java.specification.name='Java Platform API Specification' found in System Property
    [246] WARNING: Unused property: java.vendor='Sun Microsystems Inc.' found in System Property
    [247] WARNING: Unused property: http.proxyHost='192.147.1.129' found in System Property
    [248] WARNING: Unused property: java.naming.factory.url.pkgs='weblogic.jndi.factories:weblogic.corba.j2ee.naming.url:weblogic.jndi.factories:weblogic.corba.j2ee.naming.url' found in System Property
    [249] WARNING: Unused property: javax.xml.soap.MessageFactory='weblogic.webservice.core.soap.MessageFactoryImpl' found in System Property
    [250] WARNING: Unused property: sun.jnu.encoding='UTF-8' found in System Property
    [251] WARNING: Unused property: java.vm.info='mixed mode, sharing' found in System Property
    [252] WARNING: Unused property: user.dir='/home/myname/.jdeveloper/system11.1.1.0.31.51.56/DefaultDomain' found in System Property
    [253] WARNING: Unused property: sun.cpu.isalist='' found in System Property
    [254] WARNING: Unused property: java.awt.graphicsenv='sun.awt.X11GraphicsEnvironment' found in System Property
    [255] WARNING: Unused property: sun.os.patch.level='unknown' found in System Property
    [256] WARNING: Unused property: org.omg.CORBA.ORBSingletonClass='weblogic.corba.orb.ORB' found in System Property
    [257] WARNING: Unused property: java.io.tmpdir='/tmp' found in System Property
    [258] WARNING: Unused property: user.home='/home/myname' found in System Property
    [259] WARNING: Unused property: oracle.security.jps.config='/home/myname/.jdeveloper/system11.1.1.0.31.51.56/DefaultDomain/config/oracle/jps-config.xml' found in System Property
    [260] WARNING: Unused property: java.version='1.6.0_06' found in System Property
    [261] WARNING: Unused property: file.encoding.pkg='sun.io' found in System Property
    [262] WARNING: Unused property: weblogic.management.discover='true' found in System Property
    [263] WARNING: Unused property: javax.rmi.CORBA.PortableRemoteObjectClass='weblogic.iiop.PortableRemoteObjectDelegateImpl' found in System Property
    [264] WARNING: Unused property: platform.home='/u01/app/oracle/middleware/wlserver_10.3' found in System Property
    [265] WARNING: Unused property: file.encoding='UTF-8' found in System Property
    [266] WARNING: Unused property: java.vm.specification.vendor='Sun Microsystems Inc.' found in System Property
    [267] WARNING: Unused property: org.omg.CORBA.ORBClass='weblogic.corba.orb.ORB' found in System Property
    [268] WARNING: Unused property: java.security.policy='/u01/app/oracle/middleware/wlserver_10.3/server/lib/weblogic.policy' found in System Property
    [269] WARNING: Unused property: sun.io.unicode.encoding='UnicodeLittle' found in System Property
    [270] WARNING: Unused property: user.language='en' found in System Property
    [271] WARNING: Unused property: java.runtime.version='1.6.0_06-b02' found in System Property
    [272] WARNING: Unused property: jbo.34010='false' found in System Property
    [273] WARNING: Unused property: weblogic.classloader.preprocessor='weblogic.diagnostics.instrumentation.DiagnosticClassPreProcessor' found in System Property
    [274] WARNING: Unused property: weblogic.home='/u01/app/oracle/middleware/wlserver_10.3/server' found in System Property
    [275] WARNING: Unused property: proxySet='true' found in System Property
    [276] WARNING: Unused property: sun.boot.library.path='/usr/java/jdk1.6.0_06/jre/lib/i386' found in System Property
    [277] WARNING: Unused property: java.vm.name='Java HotSpot(TM) Client VM' found in System Property
    [278] WARNING: Unused property: java.home='/usr/java/jdk1.6.0_06/jre' found in System Property
    [279] WARNING: Unused property: weblogic.ext.dirs='/u01/app/oracle/middleware/patch_wls1030/profiles/default/sysext_manifest_classpath:/u01/app/oracle/middleware/patch_jdev1111/profiles/default/sysext_manifest_classpath:/u01/app/oracle/middleware/patch_cie660/profiles/default/sysext_manifest_classpath' found in System Property
    [280] WARNING: Unused property: https.nonProxyHosts='' found in System Property
    [281] WARNING: Unused property: sun.management.compiler='HotSpot Client Compiler' found in System Property
    [282] WARNING: Unused property: java.runtime.name='Java(TM) SE Runtime Environment' found in System Property
    [283] WARNING: Unused property: java.library.path='/usr/java/jdk1.6.0_06/jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jre/../lib/i386::/usr/java/jdk1.6.0_06/jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jre/../lib/i386:/u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib:/u01/app/oracle/middleware/wlserver_10.3/server/native/linux/i686:/u01/app/oracle/middleware/wlserver_10.3/server/native/linux/i686/oci920_8:/usr/java/packages/lib/i386:/lib:/usr/lib' found in System Property
    [284] WARNING: Unused property: file.separator='/' found in System Property
    [285] WARNING: Unused property: java.vm.specification.version='1.0' found in System Property
    [286] WARNING: Unused property: oracle.core.ojdl.logging.applicationcontextprovider='oracle.core.ojdl.weblogic.ApplicationContextImpl' found in System Property
    [287] WARNING: Unused property: proxyHost='192.147.1.129' found in System Property
    [288] WARNING: Unused property: sun.java.launcher='SUN_STANDARD' found in System Property
    [289] WARNING: Unused property: http.nonProxyHosts='' found in System Property
    [290] WARNING: Unused property: com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.woodstox='true' found in System Property
    [291] WARNING: Unused property: path.separator=':' found in System Property
    [292] WARNING: Unused property: org.xml.sax.parser='weblogic.xml.jaxp.RegistryParser' found in System Property
    [293] WARNING: Unused property: LC='Calling Function' found in /oracle/jbo/common/Diagnostic.properties resource
    [294] WARNING: Unused property: user.country='US' found in System Property
    [295] WARNING: Unused property: java.class.version='50.0' found in System Property
    [296] WARNING: Unused property: java.vm.specification.name='Java Virtual Machine Specification' found in System Property
    [297] WARNING: Unused property: java.specification.version='1.6' found in System Property
    [298] }} finished loading BC4J properties
    [299] -----------------------------------------------------------
    Diagnostics: (Properties (re)loaded) Routing diagnostics to standard output (use -Djbo.debugoutput=silent to remove)
    [300] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [301] JavaVMVersion: 10.0-b22
    [302] JavaVMVendor: Sun Microsystems Inc.
    [303] JavaVMName: Java HotSpot(TM) Client VM
    [304] OperatingSystemName: Linux
    [305] OperatingSystemVersion: 2.6.25-14.fc9.i686
    [306] OperatingSystemUsername: myname
    [307] jbo.323.compatible Flag: false, str: false
    [308] jbo.903.compatible Flag: false, str: false
    [309] oracle.jbo.usemds Flag: true, str: true
    following solution i tried.
    in jdev.conf
    AddVMOption -Duser.timezone="+05:30"
    in environment variable
    export TZ="Asia/Calcutta"
    please help me to start learning jdeveloper 11g.

    duplicate of java.sql.SQLDataException: ORA-01882: timezone region  not found

  • SQL DEVELOPER cut and paste does not work, slow and cannot work fast.

    I have lots of difficulties using SQL Developer, the cut/paste does not work properly, when I type search in he code editor it just paste or type the test in the source code not in the serach box. Very hectic I'm pallning to swicth to TOAD until they a a good version.

    Hello Aukhez,
    I'm sorry to hear that you're having problems with SQLDeveloper - personally, I've never had any problems with cut/copy/paste and searching, and I've been using SQLDeveloper from v1.0 to the current version, on practically every version of the JDK from 1.5-1.6u16 on both Windows and Linux.
    Sorry to state the obvious, but perhaps if you could provide a bit more specific information - such as platform, version, etc - and details of what you tried to do, someone here might be able to help...? Regarding speed, there are quite a few things you can do to make this better, but again, without knowing your setup, it's hard to give you proper directions. Plus, you'll find numerous threads here and on google about what you can do to improve speed.
    Regards,
    John

  • PL/SQL function body returning SQL - report error:ORA-01403: no data found

    Hi,
    I am working on Application Express 4.0.2.00.06, and 11G database.
    I have a problem with classic report area of type - PL/SQL function body returning SQL query. Query works if I define region area as - Use Generic Column Names (parse query at runtime only), and does not when I define it - Use Query-Specific Column Names and Validate Query.
    I am getting error:
    report error:ORA-01403: no data found
    This is my query that is returned from function, and displayed with htp.p, and it works ok and returns data in SQL Developer and SQL Workshop (in Apex).
    <code>
    /* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA
    </code>
    As you can see, I even tried with workaround that I found on the previous post on the forum, and that is to put /* select 1 from dual */ to start query.
    Any help would be appriciated.

    /* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA

  • PL/SQL function body returning SQL query - ORA-06502: PL/SQL: numeric or value error

    I'm attempting to dynamically generate a rather large SQL query via the "PL/SQL function body returning SQL query" report region option.  The SQL query generated will possibly be over 32K.  When I execute my page, I sometimes receive the "ORA-06502: PL/SQL: numeric or value error" which points to a larger than 32K query that was generated.  I've seen other posts in the forum related to this dynamic SQL size limitation issue, but they are older (pre-2010) and point to the 32K limit of the DNS (EXECUTE IMMEDIATE) and DBMS_SQL.  I found this post (dynamic sql enhancements in 11g) which discusses 11g no longer having the 32K size limitation for generating dynamic SQL.  Our environment is on 11gR2 and using ApEx 4.2.1.  I do not know which dynamic SQL method -- DNS or DBMS_SQL -- ApEx 4.2.1 is using.  Can someone clarify for me which dynamic SQL method ApEx uses to implement the "PL/SQL function body returning SQL query" option?
    As a test, I created a page on apex.oracle.com with a report region with the following source:
    declare
      l_stub varchar2(25) := 'select * from sys.dual ';
      l_sql  clob := l_stub || 'union all ';
      br     number(3) := 33;
    begin
      while length ( l_sql ) < 34000 loop
        l_sql := l_sql || l_stub || 'union all ';
      end loop;
      l_sql := l_sql || l_stub;
      for i in 1 .. ceil ( length ( l_sql ) / br ) loop
        dbms_output.put_line ( dbms_lob.substr ( l_sql, br, ( ( i - 1 ) * br ) + 1 ) );
      end loop;
      return l_sql;
    end;
    The dbms_output section is there to be able to run this code in SQL*Plus and confirm the size of the SQL is indeed larger than 32K.  When running this in SQL*Plus, the procedure is successful and produces a proper SQL statement which can be executed.  When I put this into the report region on apex.oracle.com, I get the ORA-06502 error.
    I can certainly implement a work-around for my issue by creating a 'Before Header' process on the page which populates an ApEx collection with the data I am returning and then the report can simply select from the collection, but according to documentation, the above 32K limitation should be resolved in 11g.  Thoughts?
    Shane.

    What setting do you use in your report properties - especially in Type and in Region Source?
    If you have Type="SQL Query", then you should have a SELECT statement in the Region Source. Something like: SELECT .... FROM ... WHERE
    According to the ERR-1101 error message, you have probably set Type to "SQL Query (PL/SQL function body returning SQL query)". In this situation APEX expects you to write a body of a PL/SQL function, that will generate the text of a SQL query that APEX should run. So it can be something like:
    declare
    mycond varchar2(4000);
    begin
    if :P1_REPORT_SEARCH is not null THEN
    mycond:='WHERE LAST_NAME like :P1_REPORT_SEARCH ||''%''';
    end if;
    return 'select EMPLOYEE_ID, FIRST_NAME, LAST_NAME from EMPLOYEES ' ||mycond;
    end;
    And for escaping - are you interested in escaping the LIKE wildcards, or the quotes?
    For escaping the wildcards in LIKE function so that when the user enters % you will find a record with % and not all functions, look into the SQL Reference:
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions007.htm
    (You would than need to change the code of your function accordingly).
    If you are interested in escaping the quotes, try to avoid concatenating the values entered by the user into the SQL. If you can, use bind variables instead - as I have in my example above. If you start concatenating the values into the text of SQL, you are open to SQLInjection - user can enter anything, even things that will break your SQL. If you really need to allow users to choose the operator, I would probably give them a separate combo for operators and a textfield for values, than you could check if the operator is one of the allowed ones and create the condition accordingly - and than still use bind variable for inserting the filtering value into the query.

  • SQL Query (pl/sql function body returning Sql query)

    Hi All,
    I have created a region of "SQL Query (pl/sql function body returning Sql query)" type and it is working fine , but when I am migrating(export /import) this application from development to systest environment ,
    It gives error for this region :
    Error ERR-1101 Unable to process function body returning query.
    OK
    ORA-06550: line 1, column 52: PLS-00306: wrong number or types of arguments in call to 'FU_TRADE_REPORT_QUERY' ORA-06550: line 1, column 45: PL/SQL: Statement ignored
    Any pointer ...why this is happening.
    Thanks
    Dikshit

    If your function is a stored function that is called from within APEX (function body not coded into the app itself), have you made sure that the function has been created and compiles ok prior to installing your apex app.
    If there are some dependency issues between other PL/SQL units or database objects that are causing your function not to be compiled, you apex install will fail as you are trying to reference an uncompelled bit of pl/sql.
    Let me know how you get on
    Regards
    Duncan

  • Query on Reoprts-pl/sql function body returning sql query

    Hi,
    I am facing a starnge problem.. and would like to know the reason for it.
    The situation is as follows:
    I have a report (pl/sql function body returning sql query based). My query is as follows:
    declare
    l_query1 varchar2(2000);
    begin
    if (:P102_min_value is not null and :P102_max_value is null) then
    l_query1 := 'select decode(:P102_date,'1',date1) Transaction_Date, decode(:P102_first_name,'2',first_name) First_Name from (
    select * from MORTGAGE_LOAN_LEADS where APPRX_LOAN_AMOUNT >=:P102_min_value
    return (l_query1);
    end if;
    end;
    This returns the error as :
    1 error has occurred
    Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing.
    (ORA-06550: line 7, column 20: PLS-00103: Encountered the symbol "1" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member SUBMULTISET_)
    How do i correct this? am i right in thinking that the single quotes indicating a string within a select query is creating the problem? Beacuse if i use an sql query report and use the following query, it is working fine...
    select
    decode(:P102_date,'1',date1) Transaction_Date,
    decode(:P102_first_name,'2',first_name) First_Name
    from (
    select * from MORTGAGE_LOAN_LEADS where APPRX_LOAN_AMOUNT >=:P102_min_value
    But i need to write pl/sql function, so that multiple report can be returned based on different conditions. Please guide me.
    Thanks,
    Sumana

    Does that mean that both in if and else we need to have same columns selected?
    if thats the case.. any idea how i can implement it in my code. The situation here is that the columns that need to be selected are dynamic and keep on changing...
    if i try to implement like this and run the page, it gives the following error:
    Query is:
    declare
    l_query1 varchar2(4000);
    begin
    if apex_application.get_current_flow_sgid(:APP_ID) = apex_application.get_sgid then
    if (:P102_min_value is not null and :P102_max_value is null) then
    l_query1 := 'select decode(' || :P102_date|| ',''1'',date1) Transaction_Date, decode(' || :P102_first_name || ',''2'',first_name) First_Name from (
    select * from MORTGAGE_LOAN_LEADS where APPRX_LOAN_AMOUNT >=' || :P102_min_value ||'
    elsif (:P102_min_value is null and :P102_max_value is not null) then
    l_query1 := 'select decode(' || :P102_date|| ',''1'',date1) Transaction_Date, decode(' || :P102_first_name || ',''2'',first_name) First_Name from (
    select * from MORTGAGE_LOAN_LEADS where APPRX_LOAN_AMOUNT >=' || :P102_max_value ||'
    else
    l_query1 := 'select date1,first_name from MORTGAGE_LOAN_LEADS where rownum = 1';
    end if;
    else
    l_query1 := 'select date1,first_name from MORTGAGE_LOAN_LEADS where rownum = 1';
    end if;
    return l_query1;
    --dbms_output.put_line( l_query1);
    end;
    The Error is:
    failed to parse SQL query:
    ORA-00936: missing expression
    If i try to run the same in command prompt, it always goes to the else part... (else of outer if)

  • SQL Query (PL/SQL Function Body returning SQL query) doesn't return any row

    I have a region with the following type:
    SQL Query (PL/SQL Function Body returning SQL query).
    In a search screen the users can enter different numbers, separated by an ENTER.
    I want to check these numbers by replacing the ENTER, which is CHR(13) || CHR(10) I believe, with commas. And then I can use it like this: POD IN (<<text>>).
    It's something like this:
    If (:P30_POD Is Not Null) Then
    v_where := v_where || v_condition || 'POD IN (''''''''||REPLACE(''' || :P30_POD || ''', CHR(13) || CHR(10), '','')||'''''''''')';
    v_condition := ' AND ';
    End If;
    But the query doesn't return any rows.
    I tried to reproduce it in Toad:
    select * from asx_worklistitem
    where
    POD IN (''''||REPLACE('541449200000171813'||CHR(13) || CHR(10)||'541449206006341366', CHR(13) || CHR(10), ''',''')||'''')
    ==> This is the query that does't return any rows
    select (''''||REPLACE('541449200000171813'||CHR(13) || CHR(10)||'541449206006341366', CHR(13) || CHR(10), ''',''')||'''')
    from dual;
    ==> This returns '541449200000171813','541449206006341366'
    select * from asx_worklistitem
    where pod in ('541449200000171813','541449206006341366');
    ==> and when I copy/paste this in the above query, it does return my rows.
    So why does my first query doesn't work?
    Doe anyone have any idea?
    Kind regards,
    Geert
    Message was edited by:
    Zorry

    Thanks for the help.
    I made it work, but via the following code:
    If (:P30_POD Is Not Null) Then
    v_pods := REPLACE(:P30_POD, CHR(13) || CHR(10));
    v_where := v_where || v_condition || 'POD IN (';
    v_counter := 1;
    WHILE (v_counter < LENGTH(v_pods)) LOOP
    v_pod := SUBSTR(v_pods, v_counter, 18);
    IF (v_counter <> 1) THEN
    v_where := v_where || ',';
    END IF;
    v_where := v_where || '''' || v_pod || '''';
    v_counter := v_counter + 18;
    END LOOP;
    v_where := v_where || ')';
    v_condition := ' AND ';
    End If;But now I want to make an update of all the records that correspond to this search criteria. I can give in a status via a dropdownlist and that I want to update all the records that correspond to one of these POD's with that status.
    For a region you can build an SQL query via PL/SQL, but for a process you only have a PL/SQL block. Is the only way to update all these records by making a loop and make an update for every POD that is specified.
    Because I think this will have a lot of overhead.
    I would like to make something like a multi row update in an updateable report, but I want to specify the status from somewhere else. Is this possible?

  • Error in report when executing pl/sql function body returning sql query.

    Hi,
    I have used the pl/sql function body returning sql query for creating a report. I have created a datepicker(
    P10_TASK_DATE) which can be submitted.The code is as below
    DECLARE
    v_sql varchar2(3000);
    BEGIN
    if :P10_TASK_DATE is not null THEN
    v_sql:='select
          * from tasks';
    return v_sql;
    else
    v_sql:='select * from discovery';
    return v_sql;
    END IF;
    END;if the date field is empty "select * from discovery" is executed and report is getting generated. But when we give a
    date using date picker the page is submitted and i get "report error: ORA-01403: no data found" even
    though the "tasks" table has data in it. Plz help
    Thanks,
    TJ

    hi
    Please try this
    1. Create 2 region
    1st region source=
    select * from tasks'
    go to the tab -> condition =
    item NOT NULL
    EXpression1 =:P10_TASK_DATE
    this will run whenever the item have any date
    2. open your 2 nd region source code= select * from discovery
    put the condition
    item is  NULL
    EXpression1 =:P10_TASK_DATE
    thanks
    Mark Wyatt

  • SQL Query (PL/SQL function body returning SQL query) when using to_char

    we are trying to build a report page of Type SQL Query (PL/SQL function body returning SQL query).
    our query is so simple, we need to extract the month from the recording_date column.
    declare
    l_query varchar2(1000);
    begin
    l_query:='select to_char(recording_date,'MM')from re_productive';
    return l_query;
    end;
    but we are having the following problem for this query
    Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing.
    (ORA-06550: line 4, column 42: PLS-00103: Encountered the symbol "MON" when expecting one of the following: . ( * @ % & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like between || multiset member SUBMULTISET_ The symbol ". was inserted before "MON" to continue.)
    Notes:
    1-the query is correct and it was tested under Toad and SQL Plus.
    2- we tried Use Generic Column Names (parse query at runtime only) option but we get the same problem.
    any quick help please.

    Hi
    You haven't escaped your quotes in the string. Try this...
    DECLARE
    l_query VARCHAR2(32767);
    BEGIN
    l_query:= 'select to_char(recording_date,''MM'') from re_productive';
    RETURN l_query;
    END;Cheers
    Ben

  • Using Package to produce pl/sql function body returning sql query Report

    I have existing code that we want to use in building reports in APEX. We are needing to modify it slightly to handle some new requirements, but would like to use them in reports based upon SQL query (pl/sql function body returning sql query) functionality.
    Any suggestions as how to call these in an APEX report region?
    Thank you,
    Tony Miller
    UTMB/EHN

    Hi Tony-
    I am also v new to Apex and you may have answered a question I was in search of. I, however, now have a couple more. First a bit of background-- Like in your situation, my college has a lot of existing code (400 +) that we need to get into Apex. The majority of this canned code contains one/both: 1) many lines, sometimes containing multiple select statements 2) imbedded create table & view statements (temp user owned). Up until reading your post, I was unable to figure out an easy way of getting this existing code into the product. Thanks. Now the questions, do you know how I would go about dealing with the create tables/views. I've read some posts on this forum which suggest temporary tables being unstable in this environment. Also, do you know if there's a size limitation when passing sql code via a function?
    As you may/may not be able to tell, I'm a bit lost right now... so any info you can provide would be appreciated. Thanks.
    Don

  • Pl/sql function body returning SQL query - Print function

    Hello all,
    I have pl/sql function body returning SQL query for my reports for my new project that I am developing. We dont have any BI tool or anything for APEX so we use Oracle reports to get the same reports to be printed in PDF format. I had been using SQL function for Reports all these days and grabbing the data using SQL query was easy in Oracle reports. But this time we had atleast 8 fields in search criteria and hence I thouhgt PL/sql function body returning SQL query could be something easy to handle that scenario. We have 11 such reports in our project. Now when we tried to use the same PL/sql function to oracle reports , I was told by one of our Oracle reports expert, that we have to write it into functions and use it in SQL query to get the Reports in Oracle reports. Is there any Easy way to convert the same Pl/SQL function or get a PDF format of the same report in APEX without going thru the much pains of rewriting the whole SQL Query.
    thank you
    Devisri

    Hi,
    give this a go.
    I can't test it as I don't have the tables in my schema.
    create or replace package MK_TEST_PF is
    -- Author  : MK
    -- Created : 21/06/2010 16:30:19
    -- Purpose : FOR LUCY_DISCOVER
    -- Public type declarations
    /*     -- just guess the table row types.....
         -- otherwise it won't compile
         type test_rec is record
              (INV REP.inv%type
              ,cNUMBER REP.cNUMBER%type
              ,OPENDATE REP.OPENDATE%type
              ,TARGETDATE REP.ESTCOMPLETE%type
              ,DATECLOSED REP.COMPLETED%type
              ,STATUS REP.STATUS%type
              ,cCODE REP.cCODE%type
              ,line varchar2(4000)
              ,SIGc varchar2(4000)
              ,CLASS REP.CLASS%type
              ,SUMM REP.SUMM%type
              ,AREA REP.AREA%type
         type test_rec is record
              (INV varchar2(4000)
              ,cNUMBER varchar2(4000)
              ,OPENDATE varchar2(4000)
              ,TARGETDATE varchar2(4000)
              ,DATECLOSED varchar2(4000)
              ,STATUS varchar2(4000)
              ,cCODE varchar2(4000)
              ,line varchar2(4000)
              ,SIGc varchar2(4000)
              ,CLASS varchar2(4000)
              ,SUMM varchar2(4000)
              ,AREA varchar2(4000)
         type test_tab is table of test_rec;
    -- Public constant declarations
    -- Public variable declarations
    -- Public function and procedure declarations
    end MK_TEST_PF;
    create or replace package body MK_TEST_PF is
    -- Private type declarations
    -- Private constant declarations
    -- Private variable declarations
    -- Function and procedure implementations
         function get_query_f
              (p_inv VARCHAR2 := UPPER(v('P44_INV'))
              ,p_reg VARCHAR2 := UPPER(v('P44_CLASS'))
              ,p_proarea VARCHAR2 := UPPER(v('P44_PROGRAM_AREA'))
              ,p_disp VARCHAR2 := UPPER(v('P44_DISPOSITION'))
              ,p_coding VARCHAR2 := UPPER(v('P44_CODING'))
              ,p_status VARCHAR2 := UPPER(v('P44_STATUS'))
              ,p_SIG VARCHAR2 := UPPER(v('P44_SIG_c'))
              ,p_inc_sum VARCHAR2 := UPPER(v('P44_INCLUDE_SUMM_FIELD'))
              ,p_word VARCHAR2 := UPPER(v('P44_WORD_IN_SUMM'))
              ,p_timeframe VARCHAR2 := UPPER(v('P44_TIME_FRAME'))
              ,p_rec VARCHAR2 := UPPER(v('P44_RECORD_KEEPING'))
              ,p_WORD_IN_SUMM VARCHAR2 := UPPER(v('P44_WORD_IN_SUMM'))
              ,p_ON_AFTER VARCHAR2 := UPPER(v('P44_ON_AFTER'))
              ,p_ON_BEFORE VARCHAR2 := UPPER(v('P44_ON_BEFORE'))
              return varchar2
         is
              v_sql VARCHAR2(5000);
         --     v_inv VARCHAR2(100);
         --     v_reg VARCHAR2(100);
         --     v_proarea VARCHAR2(100);
         --     v_status VARCHAR2(100);
         --     v_SIG VARCHAR2(100);
         --     v_disp VARCHAR2(100);
         --     v_coding VARCHAR2(100);
         --     v_inc_sum VARCHAR2(4);
         --     v_word VARCHAR2(4000);
              v_wildcard VARCHAR2(2000);
         --     v_timeframe VARCHAR2(100);
         --     v_rec VARCHAR2(5);
              v_record VARCHAR2(5);
              v_open VARCHAR2(100);
              v_closed VARCHAR2(100);
              v_PEND VARCHAR2(100);
              v_refSIG VARCHAR2(100);
              v_refreg VARCHAR2(100);
              v_refother VARCHAR2(100);
              v_y varchar2(100);
         BEGIN
              --v_inv := UPPER(v('P44_INV')) ;
              v_record := 'R%';
              v_wildcard := '%';
              v_open := 'OPEN';
              v_closed := 'CLOSED';
              v_PEND := 'PEND';
              v_refSIG := 'REF - SIG';
              v_refreg := 'REF - CLASS';
              v_refother := 'REF - OTHER';
              v_y := 'Y';
              v_sql := 'SELECT REP.INV as INV, REP.cNUMBER as cNUMBER, REP.OPENDATE as OPENDATE,
              REP.ESTCOMPLETE as TARGETDATE, REP.COMPLETED as DATECLOSED, REP.STATUS as STATUS,
              REP.cCODE as cCODE, apex_item.checkbox(1,REP.line,null,'''||v_y||''') line , apex_item.checkbox(1,REP.SIG,null,'''||v_y||''') SIGc ,
              REP.CLASS as CLASS, REP.SUMM as SUMM, REP.AREA as AREA from REP where 1=1';
              IF p_rec is not null then
                   IF p_rec = 'E' then
                        v_sql := v_sql|| ' and upper(REP.cnumber) not like '''||v_record||'''';
                   ELSIF p_rec = 'D' then
                        v_sql := v_sql|| ' and upper(REP.cnumber) like '''||v_record||'''';
                   ELSIF p_rec = 'I' then
                        v_sql := v_sql|| ' and REP.cnumber = REP.cnumber ';
                   end if ;
              end if ;
              IF upper(p_status) not like '%NULL%' then
                   IF upper(p_status) like '%OPEN%' then
                   v_sql := v_sql||' AND upper(REP.status) like '''||v_open||'''';
                   ELSIF upper(p_status) like '%CLOSED%' then
                   v_sql := v_sql||' AND upper(REP.status) like '''||v_closed||'''';
                   ELSIF upper(v_PEND) like '%PEND%' then
                   v_sql := v_sql||' AND upper(REP.status) like '''||v_PEND||'''';
                   ELSIF upper(v_refSIG) like '%REF - SIG%' then
                   v_sql := v_sql||' AND upper(REP.status) like '''||v_refSIG||'''';
                   ELSIF upper(v_refreg) like '%REF - CLASS%' then
                   v_sql := v_sql||' AND upper(REP.status) like '''||v_refreg||'''';
                   ELSIF upper(v_refother) like '%REF - OTHER%' then
                   v_sql := v_sql||' AND upper(REP.status) like '''||v_refother||'''';
                   END IF ;
              END IF ;
              IF p_inv = 'NULL' THEN
                   v_sql := v_sql||' AND instr(upper(REP.INV),'''||p_inv||''') > 0';
              END IF ;
              IF p_reg = 'NULL' THEN
                   v_sql := v_sql||' AND instr(upper(REP.CLASS),'''||p_reg||''') > 0';
              END IF ;
              IF p_proarea = 'NULL' THEN
                   v_sql := v_sql||' AND instr(upper(REP.AREA),'''||p_proarea||''') > 0';
              END IF ;
              IF p_disp = 'NULL' THEN
                   v_sql := v_sql||' AND instr(upper(REP.disposition),'''||p_disp||''') > 0';
              END IF ;
              IF p_coding = 'NULL' THEN
                   v_sql := v_sql||' AND instr(upper(REP.ccode),'''||p_coding||''') > 0';
              END IF ;
              IF p_SIG = ' ' THEN
                   v_sql := v_sql||' AND instr(upper(REP.SIG),'''||p_SIG||''') > 0';
              END IF ;
              IF p_word is not null then
                   v_sql := v_sql|| ' and
                   instr(upper(REP.SUMM),
                   upper(nvl('''||p_WORD_IN_SUMM||''',REP.SUMM))) > 0';
              end if ;
              If p_timeframe is not null then
                   if upper(p_timeframe) = 'OPEN' then
                   v_sql := v_sql|| ' and to_date(REP.opendate) between to_date ('''||p_ON_AFTER||''') and to_date('''||p_ON_BEFORE||''')';
                   elsif upper(p_timeframe) = 'CLOSED' then
                   v_sql := v_sql|| ' and to_date(REP.completed) between to_date ('''||p_ON_AFTER||''') and to_date('''||p_ON_BEFORE||''')';
                   elsif upper(p_timeframe) = 'EST' then
                   v_sql := v_sql|| ' and to_date(REP.estcomplete) between to_date ('''||p_ON_AFTER||''') and to_date('''||p_ON_BEFORE||''')';
                   end if;
              end if;
              v_sql := v_sql ||' order by REP.INV ';
              return v_sql;
         end get_query_f;
         function test_pf
              (p_inv VARCHAR2 := UPPER(v('P44_INV'))
              ,p_reg VARCHAR2 := UPPER(v('P44_CLASS'))
              ,p_proarea VARCHAR2 := UPPER(v('P44_PROGRAM_AREA'))
              ,p_disp VARCHAR2 := UPPER(v('P44_DISPOSITION'))
              ,p_coding VARCHAR2 := UPPER(v('P44_CODING'))
              ,p_status VARCHAR2 := UPPER(v('P44_STATUS'))
              ,p_SIG VARCHAR2 := UPPER(v('P44_SIG_c'))
              ,p_inc_sum VARCHAR2 := UPPER(v('P44_INCLUDE_SUMM_FIELD'))
              ,p_word VARCHAR2 := UPPER(v('P44_WORD_IN_SUMM'))
              ,p_timeframe VARCHAR2 := UPPER(v('P44_TIME_FRAME'))
              ,p_rec VARCHAR2 := UPPER(v('P44_RECORD_KEEPING'))
              ,p_WORD_IN_SUMM VARCHAR2 := UPPER(v('P44_WORD_IN_SUMM'))
              ,p_ON_AFTER VARCHAR2 := UPPER(v('P44_ON_AFTER'))
              ,p_ON_BEFORE VARCHAR2 := UPPER(v('P44_ON_BEFORE'))
              RETURN test_tab PIPELINED
         is
              type test_c is ref cursor;
              v_row test_tab;
              v_sql varchar2(4000);
              v_cursor test_c;
         begin
              v_sql := get_query_f
                   (p_inv
                   ,p_reg
                   ,p_proarea
                   ,p_disp
                   ,p_coding
                   ,p_status
                   ,p_SIG
                   ,p_inc_sum
                   ,p_word
                   ,p_timeframe
                   ,p_rec
                   ,p_WORD_IN_SUMM
                   ,p_ON_AFTER
                   ,p_ON_BEFORE
              open v_cursor for v_sql;
              fetch v_cursor bulk collect into v_row;
              close v_cursor;
              for i in 1 .. v_row.count loop
                   pipe row (v_row(i));
              end loop;
              return;
         end test_pf;
    end MK_TEST_PF;
    /Regards
    Michael

  • Sql query(PL/SQL function body return SQL query) with in(x,y,z) condition

    Hello,
    I've set up a region definition of type "SQL Query(PL/SQL function body return SQL query). In my query I make use of an "in" condition. When I populate :P755_INC_BARG_UNIT with a value of 0F (no quotes), I get the correct count. However, when I set :P755_INC_BARG_UNIT to 0F, 0E I get an invalid count. What do I have to set the page item to?
    When running the query in TOAD, and setting :P755_INC_BARG_UNIT to the string inside the brackets (0F, 0E) I get the proper count.
    The code I use is shown below. Any help would be appreciated,
    Alex.
    DECLARE
    v_sql VARCHAR2(32767);
    BEGIN
    SELECT count(*) "cnts",
    ''Faculty data file IDs missing in appt table'' "err_type"
    FROM hradmin.et_faculty_salary fs left outer join
    hradmin.appointments appt
    ON trim(fs.empl_id) = appt.emp_emp
    and appt.ear_activ <> ''Z''
    and appt.ear_type = ''F''
    and (appt.ear_class in (''A'',''B'',''C'',''D''))
    and appt.ear_bargunit in ( :P755_INC_BARG_UNIT )
    WHERE appt.emp_emp is null
    RETURN v_sql;
    END;

    Alex,
    try something like:
    DECLARE
    v_sql VARCHAR2(32767);
    BEGIN
    v_sql := <YOUR_SQL_STATEMENT_WITH_P755_INC_BARG_UNIT_IN_IT>;
    v_sql :=  REPLACE(v_sql, ':P755_INC_BARG_UNIT',:P755_INC_BARG_UNIT);
    RETURN v_sql;
    END; But before doing it read this:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:210612357425
    After reading you will be able to find the best solution yourself.
    Lev

  • PL/SQL function body return sql query, no data found problem

    Hi all,
    we are trying to build a dynamic report based on item selection by user. we are using SQL Query (PL/SQL function body returning SQL query). However when a user change the item and submit the page . The following error appears.
    ORA-01403: no data found.
    our query is so simple
    declare
    l_query varchar2(30000) default 'select id from chw';
    begin
    if(:P11_PARA=1) then
    l_query:='select name from chw';
    end if;
    return l_query;
    end;
    any quick help please.

    Hello Mike,
    I tried it, the problem still exists.
    ORA-01403: no data found
    my new code is
    declare
    l_query varchar2(30000) default 'select id from chw';
    begin
    if (nvl(TO_NUMBER(:P11_PARA),0) = 1) then
    l_query:='select name from chw';
    end if;
    return (l_query);
    end;
    note, there is no process in this page.
    Edited by: M.Jabr on Oct 14, 2009 6:13 AM

Maybe you are looking for

  • Movies not playing on Ipod Touch

    I purchased a movie directly from the Ipod. The download was successful but every time I try to watch the movie it says "This movie cannot be played" this is the first time I ever tried to watch a movie on it. Please help!

  • PDF in CMYK color space?

    I'm working on the most recent version of Pages from iWork 2008 running on the most recent version of Leopard, and I have to create a PDF in the CMYK color space for publication, but I do not have Acrobat Distiller. Is it possible to create a CMYK PD

  • Want to make a bootable clone...which software should I use?

    After an accident with my previous laptop I've realised the importance of backing up all my stuff. I decided on an OWC Mercury Elite-AL external hard drive and now it's arrived I want to make a bootable clone of my HD. Has anyone who has an OWC Drive

  • Flv dinamic in asp page

    Good Morning, I have a question: How i can to insert a dynamic flv in a asp page..(path is insert in a column of database)? When i try whit "insert flash video function>insert from dati source", an error occour: url can't insert because ther is not v

  • FLVPlayback Captioning

    Greetings, Have you used the FL8 FLVPlayback Captioning SKINs for Captionate? Do you know how to use the embed font feature? I have the player under a mask and the text is showing up invisible. It is indeed coming to the player, but it's invisible. H