Creating links from report fields

Hi,
I have created a report but need to make one of the fields a hyperlink (ie 'LINK' field). The report is built from parameters entered by a user & so, every record returned will contain a different 'LINK' value. How can I specify that this needs to be displayed as a hyperlink? I've tried various ways to create the link by '<a href' tags in the report customization step but to no success.
I cannot create a link component and attach it to the 'LINK' field as the value in this field changes each time depending on the entered parameters.
Any assistance that can be provided is greatly appreciated!
Thanks.

You can use SQL report to do this:
Suppose the column which contains the web addressed is called url_column, your SQL
will be something like
select htf.anchor(url_column, name) from the_table
Then in the Column Formatting page,
set the "Display as" for column url_column as HTML.
Run the report and the values form that column will be a url which links to other web sites
null

Similar Messages

  • Making dynamic links from report fields

    Is there a way to make report fields link to differnt websites? I can't use the 'link' tool in 'editing' option of making the report because the link will not be the same for each record in the database. The field itself is actually the address of the website I want to be able to link to. So essentially, what I want to do is something like: ..but this does not work. Does anyone know if this is possible??
    Thanks!

    You can use SQL report to do this:
    Suppose the column which contains the web addressed is called url_column, your SQL
    will be something like
    select htf.anchor(url_column, name) from the_table
    Then in the Column Formatting page,
    set the "Display as" for column url_column as HTML.
    Run the report and the values form that column will be a url which links to other web sites
    null

  • "edit" link from report to form does not show values

    I created a report and an attached form on two different pages. The report is a query combining two tables with outer joins. When I click on the "edit" button on the report, I get forwarded to the form page.
    My problem: When I get forwarded to the forms page, I get an empty form, and not the data from the column as expected. The "edit" button behaves more like the "create" button. Anybody an idea what I could change to be able to edit the column data?
    Thank you.

    I've met the similar problem with previous releases (1.5.0 and 1.5.1) without any objective reason.
    As I suggests, sometimes HTMLDB lost current session state. When this occurs, ALL links from reports to it's forms does not transit primary keys. I've just completed application development and I've met this behaviour every months.
    As a workaround I found folowwjing process:
    Come into administration tab, selet "Report with option to purge current session state". When I purge current session state and re-login to application, all report-form links will start to work.
    I don't know, what is the issue, but I met it so soon on my local HTMLDB environment.

  • "Create links from URLs" preference no longer working in sticky notes

    I work with reading other people's sticky notes in Adobe Acrobat X Pro (now version 10.1.1). When they wrote URLs in the sticky notes it used to recognize them as links; now they're just plain text. My Preferences > General > "Create links from URLs" option is checked ON. I aso tried View > Tools > Document Processing > "create Links from URLs" and it added two links but only outside of the sticky notes. I am on Windows 7 Professional 64-bit. Thanks.

    AFAIK, URLs inside annotations were never converted into actual links. I'm not even sure it's technically possible to do so.
    It might have happened if the annotations were flattened and the text in them became a part of the static text of the PDF. Then the URLs in it could have been converted into "live" links, but not before.

  • 11g Release 2  Installation: Error in creating link from ../bin/javaws

    While installing Oracle 11g Release 11.2.0.2 on a solaris 10 box, the installation fails on the copy phase with message below:
    INFO: creating link '../bin/javaws' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/javaws/javaws'
    INFO: creating link '../bin/javaws' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/javaws/javaws'
    INFO: Exception thrown from action: createLink
    Exception Name: LinkException
    Exception String: Error in creating link from ../bin/javaws to /app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/javaws/javaws
    Exception Severity: 1
    INFO: Exception handling set to prompt user with options to Retry Ignore

    Thank you Srini. During the prerequisite check was successfull. However here are the last 100 lines of the log:
    oui/bin/runInstaller.var oui/bin/runSSHSetup.sh oui/bin/addLangs.sh oui/bin/runConfig.sh oui/bin/attachHome.sh oui/bin/detachHome.sh
    INFO: chmod 0664 oui/jlib/OraCheckPoint.jar oui/jlib/OraInstaller.jar oui/jlib/OraInstallerNet.jar oui/jlib/OraPrereq.jar oui/jlib/OraPrereqChecks.jar oui/jlib/emCfg.jar oui/jlib/emocmutl.jar oui/jlib/http_client.jar oui/jlib/oneclick.jar oui/jlib/prov_fixup.jar oui/jlib/share.jar oui/jlib/xmlparserv2.jar oui/jlib/lib/emocmclnt-14.jar oui/jlib/lib/emocmclnt.jar oui/jlib/lib/emocmcommon.jar oui/jlib/lib/http_client.jar oui/jlib/lib/jcert.jar oui/jlib/lib/jnet.jar oui/jlib/lib/jsse.jar oui/jlib/lib/log4j-core.jar oui/jlib/lib/osdt_core3.jar oui/jlib/lib/osdt_jce.jar oui/jlib/lib/regexp.jar oui/jlib/lib/xmlparserv2.jar oui/jlib/Libraries.old/NtServiceQueries.jar oui/jlib/Libraries.old/WindowsFolders.jar oui/jlib/Libraries.old/WindowsGeneralQueries.jar oui/jlib/Libraries.old/areasQueries.jar oui/jlib/Libraries.old/clusterActionLib.jar oui/jlib/Libraries.old/clusterQuery.jar oui/jlib/Libraries.old/dbActions.jar oui/jlib/Libraries.old/dbQueries.jar oui/jlib/Libraries.old/fileActionLib.jar oui/jlib/Libraries.old/fileQueries.jar oui/jlib/Libraries.old/generalActions.jar oui/jlib/Libraries.old/generalQueries.jar oui/jlib/Libraries.old/jarActionLib.jar oui/jlib/Libraries.old/launchpadaction.jar oui/jlib/Libraries.old/netQueries.jar oui/jlib/Libraries.old/ntServicesActions.jar oui/jlib/Libraries.old/oradim.jar oui/jlib/Libraries.old/rgsActions.jar oui/jlib/Libraries.old/rgsQueries.jar oui/jlib/Libraries.old/spawnActions.jar oui/jlib/Libraries.old/standardDialogs.jar oui/jlib/Libraries.old/unixActions.jar oui/jlib/Libraries.old/unixQueries.jar oui/jlib/Libraries.old/w32OcxLib.jar oui/jlib/Libraries.old/w32RegActionLib.jar oui/jlib/Libraries.old/w32RegQueryLib.jar oui/jlib/Libraries.old/wingeneralActionLib.jar oui/jlib/jlib/emocmclnt-14.jar oui/jlib/jlib/emocmclnt.jar oui/jlib/jlib/emocmcommon.jar oui/jlib/jlib/http_client.jar oui/jlib/jlib/jcert.jar oui/jlib/jlib/jnet.jar oui/jlib/jlib/jsse.jar oui/jlib/jlib/log4j-core.jar oui/jlib/jlib/osdt_core3.jar oui/jlib/jlib/osdt_jce.jar oui/jlib/jlib/regexp.jar oui/jlib/jlib/xmlparserv2.jar
    INFO: chmod 0750 srvm/admin/ractrans
    INFO: chmod 754 OPatch/crs/auto_patch.pl OPatch/crs/crsconfig_lib.pm OPatch/crs/crsdelete.pm OPatch/crs/crspatch.pm OPatch/crs/oracss.pm OPatch/crs/patch112.pl OPatch/crs/s_crsconfig_defs OPatch/crs/s_crsconfig_lib.pm OPatch/crs/log/dummy
    INFO: chmod 644 OPatch/docs/FAQ OPatch/docs/Users_Guide.txt OPatch/docs/Prereq_Users_Guide.txt
    INFO: chmod 755 OPatch/opatch
    INFO: chmod 644 OPatch/opatchprereqs/oui/knowledgesrc.xml OPatch/opatch.pl OPatch/opatch.ini OPatch/emdpatch.pl OPatch/opatchprereqs/opatch/opatch_prereq.xml OPatch/opatchprereqs/opatch/rulemap.xml OPatch/opatchprereqs/opatch/runtime_prereq.xml OPatch/jlib/opatch.jar OPatch/jlib/opatchutil.jar OPatch/jlib/opatchprereq.jar OPatch/jlib/opatchactions.jar OPatch/jlib/opatchext.jar OPatch/jlib/opatchfmw.jar
    INFO: chmod 754 OPatch/fmw/application.py OPatch/fmw/init_def.py OPatch/fmw/main_driver.py OPatch/fmw/node_manager.py OPatch/fmw/prereq.py OPatch/fmw/start_stop.py
    INFO: chmod 644 OPatch/opatchprereqs/prerequisite.properties
    INFO:
    INFO: Start output from spawned process:
    INFO: ----------------------------------
    INFO:
    INFO: chmod: ERROR: invalid mode
    INFO: chmod: WARNING: can't access bin/cmadmin
    chmod: WARNING: can't access bin/cmctl
    INFO: chmod: WARNING: can't access bin/cmgw
    chmod: WARNING: can't access bin/cmmigr
    INFO: chmod: WARNING: can't access bin/procob
    chmod: WARNING: can't access bin/rtsora
    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: DONE Executing permissions file from :/tmp/OraInstall2011-12-08_04-13-37PM/fastcopy/setperms1.sh
    INFO: InstallProgressMonitor: Starting phase 2
    INFO: Installation in progress
    INFO: Installation in progress
    INFO: Copying files for 'Sun JDK 1.5.0.24.08 '
    INFO: Copying files for 'Sun JDK 1.5.0.24.08 '
    INFO: 12/8/11 4:19:20 PM EST: Starting install Install Phase 1 of component Sun JDK
    INFO: Calling Action unixActions10.2.0.3.0 createLink
         source = ../libjsig.so
         destination = /app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparcv9/server/libjsig.so
         overwriteExistingLink = true
         overwriteExistingDir = null
    INFO: creating link '../libjsig.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparcv9/server/libjsig.so'
    INFO: creating link '../libjsig.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparcv9/server/libjsig.so'
    INFO: Calling Action unixActions10.2.0.3.0 createLink
         source = ../libjsig.so
         destination = /app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/client/libjsig.so
         overwriteExistingLink = true
         overwriteExistingDir = null
    INFO: creating link '../libjsig.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/client/libjsig.so'
    INFO: creating link '../libjsig.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/client/libjsig.so'
    INFO: Calling Action unixActions10.2.0.3.0 createLink
         source = libjdgaSUNWffb.so
         destination = /app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparcv9/libjdgaSUNWafb.so
         overwriteExistingLink = true
         overwriteExistingDir = null
    INFO: creating link 'libjdgaSUNWffb.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparcv9/libjdgaSUNWafb.so'
    INFO: creating link 'libjdgaSUNWffb.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparcv9/libjdgaSUNWafb.so'
    INFO: Calling Action unixActions10.2.0.3.0 createLink
         source = client/libjvm.so
         destination = /app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/libjvm.so
         overwriteExistingLink = true
         overwriteExistingDir = null
    INFO: creating link 'client/libjvm.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/libjvm.so'
    INFO: creating link 'client/libjvm.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/libjvm.so'
    INFO: Calling Action unixActions10.2.0.3.0 createLink
         source = libjdgaSUNWffb.so
         destination = /app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/libjdgaSUNWafb.so
         overwriteExistingLink = true
         overwriteExistingDir = null
    INFO: creating link 'libjdgaSUNWffb.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/libjdgaSUNWafb.so'
    INFO: creating link 'libjdgaSUNWffb.so' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/lib/sparc/libjdgaSUNWafb.so'
    INFO: Calling Action unixActions10.2.0.3.0 createLink
         source = ../bin/javaws
         destination = /app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/javaws/javaws
         overwriteExistingLink = true
         overwriteExistingDir = null
    INFO: creating link '../bin/javaws' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/javaws/javaws'
    INFO: creating link '../bin/javaws' for '/app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/javaws/javaws'
    INFO: Exception thrown from action: createLink
    Exception Name: LinkException
    Exception String: Error in creating link from ../bin/javaws to /app11g/oracle/product/11.2.0/dbhome_1/jdk/jre/javaws/javaws
    Exception Severity: 1
    I

  • Enable for Commenting and Create Links from URL (JS, Acrobat Pro)

    I need to change a PDF's settings to Enable for Commenting and Annotation and then Create Links from the document's URLs.  I can do it manually, but I don't see where these properties can be adjusted with Javascript.
    Please help!

    Regarding converting URL's to real links, this script (created by me) can do
    that:
    http://try67.blogspot.com/2009/06/acrobat-add-hyperlinks-based-on-partial.html

  • Creating Links From Converted Word docs

    i converted a Word docx document to HTML that is comprised of a set of docs that are linked together.
    Consequently each section in the complete doc, (except the Title and Table of contents), actually becomes a modifiable JPG text box.
    I have been trying to create links from the Table of Contents to the individual sections.
    I have tried everything but I am missing some concept.  It's one of those things if I just see it once I'll slap myself over head fro not fiquring it out.
    Anyone have an answer for me

    I hate to burst your bubble, but Word docs are not suitable for web pages.  My advice is to PDF your docx. 
    Nancy O.

  • How to disable - General preference - Create links from URLs. Using Acrobat Javascript

    http:\\www.sdss.com should not be suggested as a link. We have manual option to uncheck -> Create links from URLs, but I need to achieve this through the script.
    Please help on this ASAP.

    That is an end user preference only. Not accessible by JavaScript. If you control the installation, then you can turn off that option for the installation but the user could still turn it back on.

  • Editing "Create links from URLs"

    My document has Preferences | General | "Create links from URLs" enabled. But when I hovver the cursor over the link, it is incorrect, with a trailing space character, showing as http://www.example.com/webaddress/20 (it should not have the trailing 20).
    I've tried using the Text Touch Up tool, but there is no trailing space in the text, and if I try and delete the last few characters, and retype them, then the Web address shows squares where I change the chacters, eg. http://www.example.com/webadd⃞⃞⃞⃞⃞⃞
    How can I edit the automatically generated web address?

    How can I edit the automatically generated web address?
    You can't.
    With the link tool you can add a link with the correct address.

  • Create links from URLs

    Hello !  i really hope someone can help me here.
    part of my job is to put magazines online. To do that, i work with all the pages combined together in one document (booklet).
    Then i click on Advanced ==> Create Links from URLs...
    Acrobat will locate, for me, all the wed addresses in all the pages of my document. It will find the "www." and pickup the rest to create the weblink.
    once this is done, i have to go through all the pages and create the links for the addresses that Acrobat DIDN'T find.  The ones that doesn't start with "www."
    •• The problem is that in most ads, the clients don't put the "www." anymore, so this is a lot of work for me, since i do this for 40 different magazines, and sometimes has 300 pages !
    i am looking for a way  for Acrobat to "recognize" the addresses that ENDS with ".com" or  ".ca"...
    ...so it would make my life easier  : )
    thank you, in advance, for your help  : )
    (i also speak french)

    I think you are going about the process backwards. The links should be placed into the document in the software used to create the original content. If the content was created in InDesign (for example) it is easy to put the links into the ID file, then you can export the pdf with links intact. Then you can use Adobe's advanced search capabilities to search for "www.", ".com", ".ca" and even ".mil". It might be possible to create a plug-in to do what you want, but assuming you are not a programmer, that would cost $.

  • Link from Report to Form in a Page

    1. I have created a page in the Page Groups. I have five tabs on this page. Under a tab I have one Report added as a Portlet. This Report has a LINK to a From. When I click on the LINK the Form opens, but not in the Portlet area. Is it possible to have a Form open in the Portlet area (replacing the Report)?
    2. I get the following error when trying to add one particular Report as a Portlet in a page:
    An unexpected error has occurred in pages: wwpob_api_page.add_portlet (WWC-44847)
    An unexpected error has occurred in portlet instances: wwpob_api_portlet_inst.create_inst (WWC-44846)
    Do anyone have any ideas?

    Doug wrote:
    I am using version 4.0 of APEX.  My question concerns linking to other APEX pages from a report.  In APEX we link to another page, which may be a form or another report, by using a column in the report as a link column.  Any column may be used to transfer values from any other column.  This works fine, but the disadvantage is that whichever column is used as the link column has a heading which identifies the column's purpose but may not identify the purpose of the transition to another page.  In Oracle Forms, we could use buttons as a column of the multi-row screen (i.e. same as APEX report), and the button's label identified the purpose for the transition.
    Is there any way to create a column in an APEX report  to serve the same purpose as the button in Oracle Forms?
    When discussing "reports" it is essential to indicate whether this means a standard report or an interactive report in order to receive an appropriate response.
    It is possible to create a link column that is distinct from report data columns. In standard reports, this is done using the Add Column Link option from the Tasks menu in the right sidebar of the Report Attributes page. In interactive reports, define a Link Column on the Report Attributes page.
    To provide further information about links to users in both cases, specify an HTML title attribute for the link in the Link Attributes property of the link definition. This will be rendered as a tooltip when the cursor hovers over the link in visual browsers, and as an audio cue on navigation to the link when using a screen reader.

  • Restrict URL Access when linking from report

    I have an application that will be a little like a wizard in that I need to control how users get to a form, so I would like to prevent them from being able to just going straight to that page and entering data into the form. I tried using various session state security options, including No URL Access, but that blows up when I try to link from a report to that form for editing purposes.
    Is there some way I can link from the report if the target page restricts URL access, and can get a get a brief overview (or point me to some documentation) on the various branch types? I can't find a good explanation anywhere and I'm hoping that solves my problem.
    thanks.

    Hi,
    1.
    What about using an Authorization Scheme and then using Security of Page Attributes.
    In fact it is schema of users, roles, and passwords.
    2.
    f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly
    f?p=6000:6004:&SESSION.::NO:6003:MY_ITEM1,MY_ITEM2,MY_ITEM3:1234,,5678
    This example:
    * Runs page 6004 of application 6000 and use the current session ID
    * Clears the current session's cache for items on page 6003
    * Indicates debug information should be hidden (NO)
    * Sets the value of MY_ITEM1 to 1234, sets the value of MY_ITEM2 to null
    (indicated by the comma used as placeholder), and sets the value of MY_ITEM3 to 5678
    - Into Column Attributes/Column Link/Link Text pick an icon.
    - Select for Attributes/Column Link/Target “URL” for table Emp_Address and into URL field type:
    javascript: popupURL('f?p=&APP_ID.: 6004:&SESSION…………');
    You can use the value of any Item. Then in the URL link page check that item.
    Moreover, you can use f?p=&APP_ID.: 6004:&SESSION…..My_Item:#ReportColumnName#.......
    I hope this would help.
    Konstantin

  • Rename or delete manually created menus from Report and Layout Manager

    Hi All,
    Does anyone know if it's possible to rename or delete a folder manually created during a report import in the Report and Layout manager?
    Kind regards,
    Matt

    Posted the question on the SAP core forum.

  • Creating link on report elements to get more info

    Hello,
    I have created a data model in BI publisher which integrates two data models one from BI Answser (a query ) and One from source data (a table)
    I have linked an element on the BI Answer data model to the corresponding lement in the source table. to get more information on that data element.
    I want to be able to create a report and click on that data element and get detail information about it. Do you know who I can do this?
    Thanks

    Could be a link to a large PDF that is taking a long time to download. They show up as blank, black windows while downloading, usually with a progress bar.

  • Creating Packages from BLOB field contents, line wrap problems

    Good afternoon,
    we use an in-house developed database-driven update system to update both our databases and filesystems, the system itself performs really well but there is still one problem I can't fix without some expert help:
    the code of to-be-updated Oracle packages is stored inside of a BLOB field, the BLOB field will contain both the package specification and package body and needs to be split into two parts to first execute the spec and then to execute the package body (I tried to execute both in a single step but this didn't work). This works for packages with less than 32767 characters and also works in some other cases but I found one case where the executed code contains an extra line wrap right in the middle of a word.
    To make it more clear (I hope it's comprehensible), imagine the following database content:
    CREATE OR REPLACE Package
    MyPack
    AS
    [... a lot procedure headers ...]
    END MyPack;
    CREATE OR REPLACE
    Package Body MyPack AS
    [... a lot more procedures ...]
    PROCEDURE myTest (intID OUT integer)
    AS
    BEGIN
      SELECT count (*) into intID FROM MyTa[--this is where the dbms_lob.substr() ends --]ble;
    END;
    END MyPack;My code searches for the second occurrence of the "Create or replace package", splits the code into spec and body, executes the specification and keeps on adding the rest of the code to a VARCHAR2A variable called "storedCode" from the BLOB. Now in the above example, after the specification has been removed from the string, the remaining characters (ending with the "MyTa" string) are added to the varchar2a variable, the next line is fetched from the BLOB via "dbms_lob.substr()" and added as long as dbms_lob.substr() does not return a NULL value (end of BLOB). When the code is executed after all has been fetched, the generated Package Body will contain an extra line wrap right in the middle of the "MyTable" word compiling the package invalid.
    This is the procedure code I use (definitely improvable, I'm better in MSSQL and MySQL dialects ...) to load, parse and execute the BLOB content:
       -- to run package code
      procedure runPackageCode (stepRef integer)
      AS
        numLines integer default 1;
        pos     integer default 1;
        storedCode    LOG_CHANGEDOBJECT.STOREDOBJECT%type;
        objectCursor  integer;
        lSqlOut     integer;
        sqlCommand  dbms_sql.varchar2a;
        emptyCommand dbms_sql.varchar2a;
        pIsError integer := 0;
        pErrorMsg varchar2(200) := '';
        updateRef integer := 0;
        currentUpdate integer := 0;
        schemaReference varchar2(20);
        -- required to do string cutting
        strLine varchar2(32767);
        strLeftFromSlash varchar2(32767);
        strRemaining varchar2(32767);
        intDelimiterPos integer := 0;
      begin
        -- retrieve update ID
        SELECT log_update_ref INTO currentUpdate FROM link_update_with_taskstep WHERE log_taskstep_ref = stepRef;
         begin
            select storedobject, change_area
            into storedCode, schemaReference
            from vw_storedobjects
            where step_id = stepRef;
         exception
          when no_data_found then
            pIsError := 1;
            pErrorMsg := 'Invalid SQL ID ' || stepRef;
            pkg_generic.LogError(updateRef, 'LocalUpdater', stepRef, 'Run package code failed: ' || pErrorMsg);
         end;
          if pIsError = 0 then     
            begin
              -- change schema
              execute immediate 'alter session set current_schema = ' || schemaReference;         
              objectCursor := dbms_sql.open_cursor;   
              loop
                strLine := UTL_RAW.CAST_TO_VARCHAR2(dbms_lob.substr(storedCode, 32767, pos));
                intDelimiterPos := regexp_instr(strLine, '\s*Create\s*or\s*Replace\s*Package', 2, 1, 0, 'i');
                while intDelimiterPos > 0
                loop
                  -- '/' found, execute currently stored statement
                  strLeftFromSlash := substr(strLine, 1, intDelimiterPos-1);
                  strLine := substr(strLine, intDelimiterPos);
                  -- execute the extracted part without any '/' in it
                  sqlCommand(numLines) := regexp_replace(strLeftFromSlash, '(^|\s+)/(\s+|$)', '', 1, 0, 'm');
                  if (sqlCommand(numLines) is not null) then
                    objectCursor := dbms_sql.open_cursor;   
                    dbms_sql.parse(objectCursor, sqlCommand, 1, numLines, true, dbms_sql.native);
                    lSqlOut := dbms_sql.execute(objectCursor);
                    dbms_sql.close_cursor(objectCursor);
                  end if;
                  -- reset sqlCommand
                  sqlCommand := emptyCommand;
                  -- reset line counter and store remaining string
                  numLines := 1;
                  -- check for further '/'s           
                  intDelimiterPos := regexp_instr(strLine, '\s*Create\s*or\s*Replace\s*Package', 2, 1, 0, 'i');
                end loop;
                -- add the remaining strLine to the sqlCommand
                strLine := regexp_replace(strLine, '(^|\s+)/(\s+|$)', '', 1, 0, 'm');
       --> I assume this line breaks the code, lpad()'ing the content to move it to the end of a varchar2a line didn't help
                sqlCommand(numLines) := strLine;
                exit when sqlCommand(numLines) is null;
                pos := pos+32767;
                numLines := numLines+1;
              end loop;
              objectCursor := dbms_sql.open_cursor;   
              dbms_sql.parse(objectCursor, sqlCommand, 1, numLines, true, dbms_sql.native);   
              lSqlOut := dbms_sql.execute(objectCursor);
              dbms_sql.close_cursor(objectCursor);
              commit;
              -- reset schema
              execute immediate 'alter session set current_schema = UPDATE_DB';
              -- set state to installed
              pkg_update.setstepstate(stepRef, 'Installed');
        exception
        when others then
              -- reset schema
              execute immediate 'alter session set current_schema = UPDATE_DB';
              -- set state to installFailed
              pkg_update.setstepstate(stepRef, 'InstallFailed');
              pkg_generic.LogError(updateRef, 'Database', stepRef, 'Run package code failed: ' || sqlerrm);
        end;
        end if;
      END;    Thanks if you kept on reading so far, I would really appreciate any feedback!
    Regards, Sascha

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    Thanks for providing an easy-to-understand problem statement and for using code tags.
    >
    the code of to-be-updated Oracle packages is stored inside of a BLOB field
    >
    This should be stored in a CLOB since it is character data. Why are you using BLOB?
    >
    the BLOB field will contain both the package specification and package body and needs to be split into two parts to first execute the spec and then to execute the package body
    >
    Good, clear problem statement. So why doesn't your code do just what you said it should do: 1) split the code into two parts, 2) execute the spec and 3) execute the body.
    Instead of writing code that does these three relatively simple steps your code tries to combine splitting and executing and mushes/mashes it all together. The result, as you found, is code that is hard to understand, hard to debug, doesn't work and doesn't report on what it is doing.
    Code like this doesn't have a performance issue so the code should implement the simple step-by-step process that you so elegantly stated in your problem description:
    1. split the code into two parts
    2. execute the spec
    3. execute the body
    My advice is to refactor your code to perform the above steps in the proper order and to add proper exception handling and reporting for each step. Then when a step isn't working you will know exactly where and what the problem is.
    Here are my recommendations.
    1. Add two CLOB variables - one will hold the spec, the second will hold the body
    2. Add a comment (you have some good ones in the code now) for every step no matter how trivial it may be
    3. Add exception/error handling to EVERY STEP
    Your code for the first step has a comment but no exception handling. What should happen if you don't get any data? Why aren't you validating the data you get? Dynamic SQL using table-driven data is great, I love it, but you MUST validate that the data you get is what you expect to get.
        -- retrieve update ID
        SELECT log_update_ref INTO currentUpdate FROM link_update_with_taskstep WHERE log_taskstep_ref = stepRef;Recommended
        -- step 1 - retrieve update ID - This is the id that determines BLAH, BLAH, BLAH - add appropriate to tell a new developer what this ID is and what it means.
        BEGIN
            SELECT log_update_ref INTO currentUpdate FROM link_update_with_taskstep WHERE log_taskstep_ref = stepRef;
        EXCEPTION
            WHEN ??? THEN -- what should happen if step 1 fails? Do it here - don't default to an exception handler that is several pages away.
        END;Your code
         begin
            select storedobject, change_area
            into storedCode, schemaReference
            from vw_storedobjects
            where step_id = stepRef;
         exception
          when no_data_found then
            pIsError := 1;
            pErrorMsg := 'Invalid SQL ID ' || stepRef;
            pkg_generic.LogError(updateRef, 'LocalUpdater', stepRef, 'Run package code failed: ' || pErrorMsg);
         end;
    Good - except there is no comment that says what this does - I assume that the query above and this block are the 'retrieve update ID ' step?
    You log an error message and set the error flag to '1'. But since you don't want to continue why aren't you exiting the procedure and returning right here?
          if pIsError = 0 then     
            beginSo now you check the error flag and do several pages of code if there were no errors.
    I don't like that 'inverted' logic.
    If you don't want to continue then STOP right now! Don't make a developer scan through pages and pages of code to find out you really aren't doing anything else if there was an error.
    Either put a RETURN statement in the exception handler above or change your code to
          if pIsError = 1 then     
            RETURN;
          end if;Now the rest of the code doesn' t have to be indented; you will never get there if there is an error. Check for errors after every step and exit right then as appropriate.
              -- change schema
              execute immediate 'alter session set current_schema = ' || schemaReference;         
              objectCursor := dbms_sql.open_cursor;   
              loop
                strLine := UTL_RAW.CAST_TO_VARCHAR2(dbms_lob.substr(storedCode, 32767, pos));
                intDelimiterPos := regexp_instr(strLine, '\s*Create\s*or\s*Replace\s*Package', 2, 1, 0, 'i');
                while intDelimiterPos > 0
                loopThis code mixes all of the steps together into one giant mess. You open a cursor, try to split the BLOB into spec and body and try to parse and execute both all within a double nested loop.
    Even if that works correctly another developer will have a hard time understanding what the code is doing and fixing it if it goes wrong. And it will go wrong if you let me test if for you because I will put garbage into the BLOB for the spec, body or both to make sure it breaks and to see how your code handles it.
    I suggest you rewrite this double nested loop to perform the three steps separately.
    1. split the code into two parts
    a. put the spec into one new CLOB variable and the body into the other.
    b. use DBMS_OUTPUT (or a work table) to output the spec and body so you can see what the code is and make sure the 'split' process worked properly. You probably created that BLOB by manually concatenating the SPEC and BODY to begin with so now create a SPLIT process to split them again and give them back to you. This is such a fundamental component that I suggest creating a new SPLIT_MY_BLOB procedure. This procedure would take a BLOB and return two CLOBS as OUT parameters: one CLOB is the spec and one is the body. Then you can reuse this 'split' procedure in other code or more complex versions of code. Modular programming is the key.
    2. execute the spec - Now have a step that executes the spec and does something appropriate if the step succeeds or if it fails. I mean, do you really want to do execute the body if the spec execution fails? What do you want to do? Should you delete the body and spec? If you don't you might wind up with an INVALID body based on old code and an INVALID spec based on the new code you were trying to use. How will anyone, including you, know that the spec and body in the ALL_SOURCE view is really two different versions of things?
    This suggests that for your use case you may want to consider DROPPING the entire package, spec and body, before trying to recreate them both. At least if the package is totally missing anyone will know that the entire thing needs to be put back. Ahhhh - but to do that you need to know the package name so you can drop it. Than may require adding another step to get the package name from your data-driven table and adding a DROP PACKAGE step.
    3. execute the body - This step executes the body. Hmmmm - we have two nearly identical steps. So why don't you create a new function/procedure that takes a CLOB as input, uses dynamic sql to execute it and returns a result code. That would be useful. Then you could execute ANY sql stored in a CLOB and have a generic function that you can use for other things.
    Right now you are using the VARCHAR2 table version of DBMS_SQL.PARSE but you would change this to use the CLOB version.
    The end result of this refactoring is a main function/procedure that acts as the CONTROL - it decides what to do and what data (BLOB) to do it with. But it doesn't actually do ANY of the work. It just controls what is done.
    And you have a couple of generic, reuseable functions that actually do the work. One knows how to split a CLOB into spec and body. The other knows how to use dynamic SQL to execute a CLOB.
    Now you have a modular architecture that is easy to understand, easy to code and easy to test.

Maybe you are looking for

  • API to update/ create Organization EIT

    Hi All, I 'am trying to find the API to update/ create EITs for HR Organizations. While I can find the API to update person and assignments hr_assignment_extra_info_api/ hr_person_extra_info_api, I 'am not able to find out the API/ package for Organi

  • Pass constant values to ODI functions in interface mapping

    I have a generic ODI user function Populate_TRG_COLS($(in1), $(in1Val), $(in2), $(in2Val), $(in3)) Implementation (ORACLE): CASE WHEN $(in1)=$(inVal1) AND $(in2)=$(inVal2) THEN $(in3) END I use this function when mapping my target columns at say TRG_

  • IMac won't let my wife sign on

    My wife has been having an issue signing onto her computer. She kept trying the password that she has been using for the past few years but it wouldn't take it.  She tried reseting her password but still will not work.  In essence, she is locked out

  • New soft ware won't recognize computer

    I recently update the new software and I cannot load my existing music on my IPOD. It pops up a window saying This computer is not authorized to play this music. So I go to the advance screen and update the computer. It still says the same thing. I c

  • My ipad wi-fi won't connect with my home wireless network

    I've had this ipad for a week. it was working fine. today i used it at Starbucks and it conencted fine. Now I'm at home and it won't connect back to my network. I've tried to re-set the network - didn't work. turned wi-fi off and on -- didn't work. i