Dynamic Images in PDF and Escaping Special Characters

I used the following to create my own PDFs with dymnamic images:
http://marcsewtz.blogspot.com/2012_02_01_archive.html (Dynamic Images in PDF - What 32k Limit? )
I have installed this application on Oracle's free workspace to test.
The issue I am having is that when there is a special character in the description, such as <>'"& then the the PDF will not open. I have tried using the dmbs_xmlgen.convert to convert the description but haven't had any luck.
I'm a complete novice with xml. Any help with this is greatly appreciated.
Thanks,
Glen

I have been able to find a solution, but it's not completely perfect. I have changed the "description" field as follows:
XMLCdata(replace(description,''&'',''and'')) description,
The characters greater than (>), less than (<), single qoute('), and double quote (") can now all be in the description and will not cause errors. For some reason, I couldn't get the & not to give an error no matter what I tried, so I just replaced the & with the word "and". This solution will work for my needs, but it would be nice to be able to get the & to display.
Does anyone know of a way to get the & to display correctly?
Thanks again,
Glen
The complete code I am using is below:
declare
l_print_layout clob;
l_xml_data clob;
begin
-- load print layout from database
for c1 in (
select layout from eba_pdfimg_layouts where id = :P1_LAYOUT
) loop
l_print_layout := wwv_flow_utilities.blob_to_clob(c1.layout );
end loop;
-- generate XML data
for c2 in (
select dbms_xmlgen.getxml('
select
id,
file_name,
mime_type,
XMLCdata(replace(description,''&'',''and'')) description,
-- description,
blob2clobase64(image,''Y'') image
from eba_pdfimg_images
') xml_data from dual
) loop
l_xml_data := c2.xml_data;
end loop;
-- download print document
wwv_flow.g_page_text_generated := true;
apex_util.download_print_document (
p_file_name => 'image_demo',
p_content_disposition => 'ATTACHMENT',
p_report_data => l_xml_data ,
p_report_layout => l_print_layout,
p_report_layout_type => 'rtf',
p_document_format => :P1_FORMAT
end;

Similar Messages

  • SQL Injections and XSS - Escaping Special Characters

    Hi, hope someone can help in regards to security and SQL Injections and XSS.
    We are using APEX 4.0.2 on Oracle 11.2.0.2.
    1. It seems the special characters we have entered into normal 'Text Items' 'Text Areas' etc are not being escaped (ie <,>,&, '). If I enter them into the field (ie Surname) they are saved as is into session state and the database - no escaping. Am I missing something such as an environment setting as I thought the "smart" oracle escaping rules would cater for this.
    Surely I don't have to manually do each of then.
    Just to confirm, am I looking in the correct places to assess if the characters are escaped or not - ie should they show as '&amp;&lt;&gt;' in session state and/or the database ?
    2. Also, for the Oracle procedures such as '‘wwv_flow.accept’ , ‘wwv_flow.show’ , 'wwv_flow_utilities.show_as_popup_calendar' - do these escape special characters. If not, then they must be vulnerable to SQL Injections attacks.
    Thx
    Nigel

    Recx Ltd wrote:
    Just to pitch in, escaping values internally (either in the database or session state) is extremely problematic. Data searches, string comparison, reporting and double escaping are all areas which suffer badly when you do this.
    Stripping characters on input can also cause problems if not considered within the context of the application. Names such as "O'Niel", statistical output such as "n < 300", fields containing deliberate HTML markup can be annoying to debug. In certain situations stripping is totally ineffective and may still lead to cross-site scripting.
    Apex applications that share the database with other applications will also be affected.
    The database should contain 'raw' unfettered data and output should be escaped properly, as Joel said, at render time. Either with Apex attributes or using PLSQL functions such as htf.escape_sc() as and when required.Do not needlessly resurrect old threads. After a couple of months watches expire and the original posters are not alerted to the presence of your follow-up.
    Shameless plug: If you are in the game of needing to produce secure Apex code, you should get in touch.This crosses the line into spam: it violates the OTN Terms of Use&mdash;see 6(j).
    Promotional posts like this are liable to be removed by the moderators.

  • Dynamic Images in PDF Report

    Hi,
    I want to create Badges from employee table (ID, NAME, JOB_TITLE, PHOTO). I downloaded and installed a demo application "USING DYNAMIC IMAGES IN PDF REPORT". It works fine with smale images < 20K. I'm getting the following error for images > 20K :
    "ORA-06502: PL/SQL: numeric or value error: raw variable length too long"
    it seems like a buffer problem.
    could you pls help to solve this problem
    Thanks,
    Ribhi

    Hi Carsten
    That was exactly* I was looking for. Maybe I should Google more in German ;-)
    The main problem was that I defined my image outside the first repeating group (that doesn't repeat, it's always just one object) - the first group is followed by 7 more.
    Just like the "Name" (that's positioned outside the group in the document header), I positioned the image above the table representing the group.
    Doing that, the "Name" is filled correctly, the Image only when the Output Format is Excel or HTML - not Word or PDF ... makes no sense but that's tje way it is.
    After moving the image inside the group....it works great!
    (One more thing...the image size is fixed to the image you use as "dummy". Is there any way to make that more flexible, because now some scaling happens...)???
    @Trent: That was the way we initially did it, but when the size of the row exceeds 32K...you know what happens.. And even with a small image the 32K limit is hit easily
    The way I use it now (very similar to Carsten's description) there is no limit....
    Thank you all!
    Roel

  • 10g won't recognize ellipsis and other special characters.

    I'm trying to insert data into both VARCHAR2 and CLOB columns that contains characters such as ellipsis and other special characters. Oracle doesn't recognize the characters and just converts it to garbage. Is there a way to make Oracle easily recognize these characters?
    For example, it won't recognize the following ellipsis in the string:
    "Here we are … right now."

    My bad...I did look at the national character set instead.
    When I performed theq query you posted, I got the following:
    NLS_CHARACTERSET
    WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    I hope this new information helps. Also, the tool involved is SQL *Plus, but I'm currently concentrated on getting the insert to work via JDBC. Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • I have set up my work Exchange email/calendar. After setting up I am getting passcode expired message and asking for changing the passcode with a 16   digit and 4 special characters. No combination of numberic, alphanumeric, special characters works. Help

    I have set up my work Exchange email/calendar. After setting up I am getting passcode expired message and asking for changing the passcode with a 16 +  digit and 4 special characters. No combination of numberic, alphanumeric, special characters is working. Help!!

    I have set up my work Exchange email/calendar. After setting up I am getting passcode expired message and asking for changing the passcode with a 16 +  digit and 4 special characters. No combination of numberic, alphanumeric, special characters is working. Help!!

  • Vbscript to rename files and replace special characters

    Dear Exprt,
    would you please help to add addtional requirement for rename and replace special characters for file
    by the below script i can re name.
    strAnswer = InputBox("Please enter folder location to rename files:", _
        "File rename")
        strfilenm = InputBox("Enter name:", _
        "Rename Files")
    Set FSO = CreateObject("Scripting.FileSystemObject")
    Sub visitFolder(folderVar)
        For Each fileToRename In folderVar.Files
            fileToRename.Name = strfilenm & fileToRename.Name
        Next
        For Each folderToVisit In folderVar.SubFolders
            visitFolder(folderToVisit)
        Next
    End Sub
    If FSO.FolderExists(strAnswer) Then
        visitFolder(FSO.getFolder(strAnswer))
    End If
    [email protected]

    Thx would you please look below what wrong in its run  nothing happend no error
    strAnswer = InputBox("Please enter folder location to rename files:", _
        "Test")
        strfilenm = InputBox("Enter name:", _
        "Rename Files")
    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set regEx = New RegExp
    'Your pattern here
    Select Case tmpChar
    Case "&"
    changeTo = " and "
    Case "/"
    changeTo = "_"
    Case Else
    changeTo = " "
    End Select
    regEx.Pattern = tmpChar 
    Sub visitFolder(folderVar)
        For Each fileToRename In folderVar.Files
            fileToRename.Name = strfilenm & fileToRename.Name 
            fileToRename.Name = regEx.Replace(fileToRename.Name, tmpChar)
        Next
        For Each folderToVisit In folderVar.SubFolders
            visitFolder(folderToVisit)
        Next
    End Sub
    [email protected]

  • Capturing returns and other special characters

    Greetings,
    I'm curious to know what is 'normally' done to capture
    returns and other special characters from textareas. I want my user
    to be able to insert 'control' characters into the text area to
    allow them to provide some structure to the information they're
    entering. At the moment, I'm processing the text char by char and
    working out if it's an 'enter' or whatever, then appending a
    '<br />' to the string before I store it and so on.
    Is there a more established way to do this sort of
    thing?

    Use the replace function to replace either chr(10) or chr(13)
    with a break tag. It's using cold fusion functions to accomplish
    the same thing you appear to be doing manually.

  • E72: Swedish and other special characters not work...

    When I send mail through MfE, swedish and other special characters do not reach the recipient, they are just ignored. No blanks or nothing. Every word with a swedish character ends up one letter short.
    Before the firmware upgrade this was intermittent, happening only on about half of my mails.
    Now I upgraded yesterday, and it seems the problem is now permanent.
    Have seen similar posts from E75 and E90 owners, their problems seem to have been fixed by newer firmware.
    Our setup is: Exchange 2003, Portwise authentication.
    All other phone models work fine, like iPhone, E71 etc.
    /Sebastian

    After some testing I found out that if I use swedish chars in the subject line, it works fine. Even in the mail body.
    If I don't use swedish chars in the subject, they won't work in the body. I either get garbage or nothing where the swedish chars should be.
    The problem doesn't exist at all in my private IMAP mail account.
    Could someone who uses Mail for Exchange and have special chars in their alphabet (swedish, finnish, german, hungarian etc) pls tell me how it's working out for you?
    Message Edited by Seb_Martin on 28-Jan-2010 11:15 AM

  • How to escape special characters in Simple Transformation

    Hi Experts,
    I have got a problem to get a well formed xml document from the below simple transformation. The content of maktx contains
    special characters like & <, which are not allowed in a well formed XML-Document. But the result of the Simple Transformation
    contains this charcters even after the transformation as you can the in the result below. Has anyone a hint how to escape the
    characters included in the maktx.
    The transformation for maktx, should be something like
    Before: Material & < TEST
    After: Material &amp &lt TEST
    Report wihich calls the simple transformation
    types:
    BEGIN OF t_mat,
       matnr type matnr,
       maktx type maktx,
    end of t_mat.
    Data:
      mat type t_mat,
      xml_stream type xstring.
    START-OF-SELECTION.
    mat-matnr = '4711'.
    mat-maktx = 'Material & < Test'.
    CALL TRANSFORMATION ztest_st2
            SOURCE mat = mat
            RESULT XML xml_stream.
    CALL FUNCTION 'DISPLAY_XML_STRING'
      EXPORTING xml_string = xml_stream.
    Simple Transformation
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="MAT"/>
      <tt:template>
        <Leistungsschild>
            <CHARACT> MATNR </CHARACT>
            <CHARACT_DESCR> Materialnummer </CHARACT_DESCR>
            <VALUE tt:value-ref="MAT.MATNR"/>
            <CHARACT> MAKTX </CHARACT>
            <CHARACT_DESCR> Materialkurztext </CHARACT_DESCR>
            <VALUE tt:value-ref="MAT.MAKTX" />
        </Leistungsschild>
      </tt:template>
    </tt:transform>
    RESULT
    <?xml version="1.0" encoding="utf-8" ?>
    <Leistungsschild>
      <CHARACT>MATNR</CHARACT>
      <CHARACT_DESCR>Materialnummer</CHARACT_DESCR>
      <VALUE>4711</VALUE>
      <CHARACT>MAKTX</CHARACT>
      <CHARACT_DESCR>Materialkurztext</CHARACT_DESCR>
      <VALUE>Material & < Test</VALUE>   </Leistungsschild>

    Hi Sandra,
    First of all thaks for your quick answer to my problem.
    I see what you mean and get the same result, if I am using data-type string instead of xstring. But the recommendation in the XML-Books of SAP is to use XSTRING to save memory and circumflex problems between Codepages, when writing the XML-Stream to a filesystem.
    As you can see in the code abvoe I am using a SAP-FM to display the XML-Stream and this FM works only with XSTRING´s,
    that is one reason why I don´t understand that it displays it in the wrong way.
    Even the Debugger shows me for the XSTRING the wrong result. Does all that mean that the escaping will not be applyed if you are working with XSTING´s??

  • Strategies for escaping special characters.

    Hi all,
    Our app(built using Workshop) needs to have a generic way of scrubbing special
    characters that a user might enter in the UI,and which might cause our sql that
    queries the DB to become malformed. To explain further,some of our DB controls
    are not using PreparedStatements to set Strings..instead, we are constructing
    the sql as a java string like:
    String myQuery="Select * from * where TOUPPER(name) like"+param.ToUpperCase().
    and then we do:
    Statement stmt=conn.createStatement();
    stmt.executeQuery(myQuery).
    In such cases, Oracle JDBC driver does not escape any special chars in the String
    param,and fails.Other than converting all our queries to use PreparedStatements,
    is there a generic pattern/Util class(mebbe RequestUtils) or some way of using
    the Servlet Filter API to scrub out any special chars that are input by the user?
    Thanks in advance.
    Vik.

    ServletFilter is the way to go on this one. Don't think there is anything built
    into Servlet spec that handles these characters, however, there are a number of
    sample filters that do such a task. I think there is a sample in either the O'Reilly
    book on Servlets or Core Servlets.
    "Vik" <[email protected]> wrote:
    >
    Hi all,
    Our app(built using Workshop) needs to have a generic way of scrubbing
    special
    characters that a user might enter in the UI,and which might cause our
    sql that
    queries the DB to become malformed. To explain further,some of our DB
    controls
    are not using PreparedStatements to set Strings..instead, we are constructing
    the sql as a java string like:
    String myQuery="Select * from * where TOUPPER(name) like"+param.ToUpperCase().
    and then we do:
    Statement stmt=conn.createStatement();
    stmt.executeQuery(myQuery).
    In such cases, Oracle JDBC driver does not escape any special chars in
    the String
    param,and fails.Other than converting all our queries to use PreparedStatements,
    is there a generic pattern/Util class(mebbe RequestUtils) or some way
    of using
    the Servlet Filter API to scrub out any special chars that are input
    by the user?
    Thanks in advance.
    Vik.

  • Using Dynamic Images in PDF Reports

    There are a number of threads in the forum where we talked about dynamically including images in PDF reports before. In order to illustrate one technique you can use for doing this, I put together a sample application that illustrates how to dynamically include images that are stored in BLOB columns. I installed the application on apex.oracle.com and made it available for download and local install. You can find the link and login information for this application as well as the download link here:
    http://marcsewtz.blogspot.com/2008/06/one-question-about-pdf-printing-feature.html

    Based on a discussion we had today in another thread, I think it makes sense to add to this thread that the XSL-FO snipped used to get BI Publisher to render images is used when referencing images in a report column, e.g. you included them in your RTF layout using the BI Publisher Desktop Insert->Table option. In this case, the column is referenced with “value-of select”:
    <fo:instream-foreign-object content-type="image/jpg">
    <xsl:value-of select="LOGO"/>
    </fo:instream-foreign-object>
    On the other hand, if you want to dynamically include a company logo, or other data that’s not necessarily repeating, e.g. there’s only one value, then you would use the BI Publisher Desktop Insert->Field option . And you would reference your field as follows:
    <fo:instream-foreign-object content-type="image/jpg">
    <?LOGO?>
    </fo:instream-foreign-object>
    So in this case LOGO refers to either a single-value field, or a single-row report column value.
    Regards,
    Marc

  • SO_NEW_DOCUMENT_ATT_SEND_API1 sending pdf with wrong special characters

    Hi Experts,
    Im using the fm SO_NEW_DOCUMENT_ATT_SEND_API1 to send out a pdf (into sap office box). But when I open it
    I get totally wrong special characters (Chinese for instance, and ' is replaced by #).
    I have already applied the note 1430123 but it didnt resolve the issue.
    Can anybody help on this?
    Help will highly appreciated.
    Hubert

    Yes. This is very much possible.
    gv_xstring contains the pdf data in XSTRING format.
    Check the code :
    *   ---------- create persistent send request ----------------------
      send_request = cl_bcs=>create_persistent( ).
    *   ---------- Create document ----------------------------------------
    *   get PDF xstring and convert it to BCS format
      lp_pdf_size = XSTRLEN( gv_xstring ).
      pdf_content = cl_document_bcs=>xstring_to_solix(
          ip_xstring = gv_xstring ).
    *     Create Mail Body
      CLEAR ls_body.
      CONCATENATE 'Dear' gv_name1 ',' INTO ls_body SEPARATED BY space .
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body = 'Warm greetings '.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body = 'Manager'.
      APPEND ls_body TO lt_body.
      document = cl_document_bcs=>create_document(
                      i_type    = 'RAW'
                      i_text    = lt_body
    *                  i_length  = '12'
                      i_subject = 'Letter' ).
    **   Add Attachment to send request
      CALL METHOD document->add_attachment
        EXPORTING
          i_attachment_type    = 'PDF'
          i_attachment_subject = 'Letter'
          i_att_content_hex    = pdf_content.
    *     add document to send request
      CALL METHOD send_request->set_document( document ).
    *   ---------- add recipient (e-mail address) ----------------------
      IF gv_adrnr IS INITIAL.
        SELECT SINGLE adrnr
          FROM kna1
          INTO gv_adrnr
         WHERE kunnr EQ gv_kunrg.
      ENDIF.
      SELECT SINGLE smtp_addr
        INTO lv_email
        FROM adr6
       WHERE addrnumber EQ gv_adrnr.
      recipient = cl_cam_address_bcs=>create_internet_address(
          i_address_string = lv_email ).
    *   add recipient to send request
      send_request->add_recipient( i_recipient = recipient ).
    *   ---------- send document ---------------------------------------
      sent_to_all = send_request->send(
          i_with_error_screen = 'X' ).
      IF sent_to_all = 'X'.
    *    MESSAGE i022(so).
        gv_emailflag = 'X'.
      ENDIF.
    *   ---------- explicit 'commit work' is mandatory! ----------------
      COMMIT WORK.

  • Escape special characters for OData response

    Hi all,
    I'm facing a problem on HTTP response when some special characters are in my entity fields.
    For example I've got a Edm.String field which has characters like ###, ", < (two number signs ## are ok, but three invoke an error)
    When I set output format to xml via URI parameter $format=xml, I get following error:
    <message xml:lang="en">In the context of Data Services an unknown internal server error occured</message>
    Exception /IWCOR/CX_DS_INTERNAL_ERROR in class /IWCOR/CL_DS_EP_WRITER_OUTPUT method /IWCOR/IF_DS_EP_WRITER_OUTPUT~WRITE and Line 39
    If I use JSON as output format, HTTP response code is 200!!, but payload just ends on the character which cannot be interpreted:
    (ABAP)-JSON generator can handle double quotes much better than XML format:
    How can I escape these output strings, without adding chars which will appear in response payload?
    Thanks,
    Steffen

    Hi Uwe & Ron,
    thanks for your ideas, but maybe we're not talking about binary data?! This field is an example from TADIR table.
    OData entity definition for this field:
    Versid
    Edm.String
    0
    0
    20
    ABAP field definition:
    Data Type        CHAR  -  Character String
    No. Characters       20
    Decimal Places        0
    Output Length        20
    Convers. Routine    <empty>
    Uwe did you mean another debugger view?
    SE16 output for this line:
    What if I want to store and receive data with these special chars like ####, ", <, >,... in a ABAP char field (respective OData Edm.String)?
    Thanks,
    Steffen

  • Converting PageMaker doc to pdf: problem with special characters

    I am using PageMaker 7 on Windows XP. I converted a PageMaker document to pdf (I use Acrobat 8 Professional), which worked fine except for two special characters that didn't convert:  ć and ş, which convert as ae and a degree sign. What can I do to convert the document properly?
    Thanks!

    You may want to ask in the Acrobat forum since Reader is simply viewing the results.
    But I would suspect that you are having font embedding issues. Check to see that all fonts are embedded in the document. File>Properties>Fonts.

  • Howto escape special characters if using regexp_replace & regexp_substr

    hello experts,
    following test case
    insert into querytest1 (d) values
    ('#1(170):[{"type":"FACEBOOK","count":0,"lastEdition":1382627403299},{"type":"GOOGLE","count":0,"lastEdition":1381825285002},{"type":"EMAIL","count":2,"lastEdition":1381826322925}] #2(0):  #3(5):-3141 #4(5):-3141 #5(5):21804 #6(7):3890750 #7(3):s11');
    select regexp_replace(d, REGEXP_SUBSTR (REGEXP_SUBSTR(d, '[^ ]+', 1, 1), '[^:]+', 1, 2 ),'') from querytest1;
    ERROR at line 1:
    ORA-12726: unmatched bracket in regular expression
    proof that []{} special characters are the problem:
    delete from querytest1;
    commit;
    -- insert data without special characters
    insert into querytest1 (d) values ('#1(170):"type":"FACEBOOK","count":0,"lastEdition":1382627403299,"type":"GOOGLE","count":0,"lastEdition":1381825285002,"type":"EMAIL","count":2,"lastEdition":1381826322925] #2(0):  #3(5):-3141 #4(5):-3141 #5(5):21804 #6(7):3890750 #7(3):s11');
    select regexp_replace(d, REGEXP_SUBSTR (REGEXP_SUBSTR(d, '[^ ]+', 1, 1), '[^:]+', 1, 2 ),'') from querytest1;
    REGEXP_REPLACE(D,REGEXP_SUBSTR(REGEXP_SUBSTR(D,'[^]+',1,1),'[^:]+',1,2),'')
    #1(170)::"FACEBOOK","count":0,"lastEdition":1382627403299,:"GOOGLE","count":0,"lastEdition":1381825285002,:"EMAIL","count":2,"lastEdition":1381826322925,:"EMAIL","count":2,"lastEdition":1381826322925] #2(0):  #3(5):-3141 #4(5):-3141 #5(5):21804 #6(7):3890750 #7(3):s11
    so now it works because there are no special characters []{}
    is there a way to escape them?
    thank you in advance.

    oraman wrote:
    ok you're right I explain from the beginning.
    create table t (q varchar2(4000), d varchar2(4000), result varchar2(4000));
    insert into t (q,d) values ('#1(170):[{"type":"FACEBOOK","count":0,"lastEdition":1382627403299},{"type":"GOOGLE","count":0,"lastEdition":1381825285002},{"type":"EMAIL","count":2,"lastEdition":1381826322925}] #2(0):  #3(5):-3141 #4(5):-3141 #5(5):21804 #6(7):3890750 #7(3):s11',
    'UPDATE mytable set value=:1 , valuec=:2 , longvalue=:3 , doublevalue=:4  WHERE productattrnameid=:5  AND productid=:6   AND context=:7');
    I would like to get the following:
    select result from t;
    UPDATE mytable set value='[{"type":"FACEBOOK","count":0,"lastEdition":1382627403299},{"type":"GOOGLE","count":0,"lastEdition":1381825285002},{"type":"EMAIL","count":2,"lastEdition":1381826322925}]' , valuec=NULL , longvalue=-3141 , doublevalue=-3141  WHERE productattrnameid=21804  AND productid=3890750   AND context='s11';
    the logic is to get the auditing data as ready to execute queries.
    It looks you want to include every parameter where parameter is a pattern prefixed by #p1(lenght):param_value #p2(lenght):param_value etc.
    Something like this?
    set line 1000
    col txt format a200
    with querytest1 as
    select '#1(170):[{"type":"FACEBOOK","count":0,"lastEdition":1382627403299},{"type":"GOOGLE","count":0,"lastEdition":1381825285002},{"type":"EMAIL","count":2,"lastEdition":1381826322925}] #2(0):  #3(5):-3141 #4(5):-3141 #5(5):21804 #6(7):3890750 #7(3):s11' d
      from dual
    select 'UPDATE mytable set value='''|| nvl(trim(regexp_substr (d,'#\d+\(\d+\):([^# ]+)', 1, 1, null, 1 )), 'NULL')||''''
           || chr(10) ||'     , valuec='||nvl(trim(regexp_substr (d,'#\d+\(\d+\):([^#]+)', 1, 2, null, 1 )), 'NULL')
           || chr(10) ||'     , longvalue='|| nvl(trim(regexp_substr (d,'#\d+\(\d+\):([^#]+)', 1, 3, null, 1 )),'NULL')
           || chr(10) ||'     , doublevalue='||nvl(trim(regexp_substr (d,'#\d+\(\d+\):([^#]+)', 1, 4, null, 1 )),'NULL') 
           || chr(10) ||' WHERE productattrnameid='||regexp_substr (d,'#\d+\(\d+\):([^#]+)', 1, 5, null, 1 )
           || chr(10) ||'   AND productid='||regexp_substr (d,'#\d+\(\d+\):([^#]+)', 1, 6, null, 1 )  
           || chr(10) ||'   AND context='''||regexp_substr (d,'#\d+\(\d+\):([^#]+)', 1, 7, null, 1 )||''';' txt
      from querytest1;
    Result:
    TXT                                                                                                                                                                                                    
    UPDATE mytable set value='[{"type":"FACEBOOK","count":0,"lastEdition":1382627403299},{"type":"GOOGLE","count":0,"lastEdition":1381825285002},{"type":"EMAIL","count":2,"lastEdition":1381826322925}]'  
         , valuec=NULL                                                                                                                                                                                     
         , longvalue=-3141                                                                                                                                                                                 
         , doublevalue=-3141                                                                                                                                                                               
    WHERE productattrnameid=21804                                                                                                                                                                         
       AND productid=3890750                                                                                                                                                                               
       AND context='s11';                                                                                                                                                                                  
    1 row selected.
    I have a problem formatting the output in the forum but I hope you get it.
    Regards.
    Alberto

Maybe you are looking for

  • Safari Crashes when trying to open.

    I have tried reinstalling safari, uninstalling flash and reinstalling. And Repairing Disk permissions....any help would be great...this is my first Mac. Date/Time: 2010-12-05 18:40:22.951 -0600 OS Version: 10.4.11 (Build 8S165) Report Version: 4 Comm

  • Why have I lost recently added photos from iPhoto?

    My wife downloaded some photos of a recent trip to her iPhoto account, which fortunately also automatically saved on her iPad.  However, shortly afterwards the photos disappeared from the iPhoto folder (which still showed up in iPhoto with the same f

  • Monthly Sales report of a given Year

    Hi Experts, I have a requirement that User enters Fiscal year in Selection Prompt, based on the year, user wants monthly sales  like Jan-2010 | Feb-2010 | March 2010 | ..........| Dec-2010 How can i get this? My report layout is like Vendor nbr     V

  • Budget carry forward problem

    Guys, When i try to carry forward my budget for internal orders in KOCO i am getting this error. I am trying to carry forward budget of 2008. We are testing are year end steps. How does the system determine which fiscal year is closed? i have closed

  • Custum layout, accessibility issue

    I am a one handed digital artist. I have never had any problems making keyboard layouts for any operating systems or programs, Including Adobe applications, until I was given a mac to work on during my full time summer internship. I successfully crea