Get literal string when using CLOB

Hi, I am using Oracle 11.2.0.3 on Windows 2003 R2 and I have a procedure to extract the different bits of XML and GML of an XMLType column. GML for a record can be one or more geometries and I need to derive a unique SDO_GEOMETRY to and convert to WGS84. I created a function called MULTI_GML_TO_SDOGEOM in which I analyze my GML as a CLOB. I can add it to a SQL_STMT variable which is also a CLOB. In the treatment of 10,000 records, this function worked well for 8000 in vain, then when he struck a record that had more than 4,000 characters in GML (seven geometries) with an ORA-01704 string literal too long. I am in debug on each line of the function and found the function failed on the open cursor statement
OPEN c_geoms FOR sql_stmt;
I don't understand why I get this error that the total length of sql_stmt for registration failed, it is about 7500 characters and I use CLOB which must be able handle length. I don't know if I have not used the CLOB correctly or maybe I need to use something DBMS_LOB package but I can't find any decent examples and I don't really know why it does not work in any case.
Here's the function:
CREATE OR REPLACE FUNCTION MULTI_GML_TO_SDOGEOM (
   geometry_components IN CLOB)
   RETURN sdo_geometry
IS
v_count             NUMBER;
v_gml               XMLType;
v_gml_rec           XMLType;
v_gml_clob          CLOB;
v_gml_clob_rec      CLOB;
sql_stmt            CLOB;
v_sdogeom           SDO_GEOMETRY;
v_sdogeom_all       SDO_GEOMETRY;
varray_sdogeom      SDO_GEOMETRY_ARRAY;


TYPE t_ref_cursor  IS REF CURSOR;
c_geoms         t_ref_cursor;

BEGIN

varray_sdogeom := SDO_GEOMETRY_ARRAY();

IF geometry_components is not null THEN

  v_gml := XMLType ('<GeometryComponents xmlns:gml="http://www.opengis.net/gml/3.2">'||geometry_components||'</GeometryComponents>');

  v_gml_clob := v_gml.getClobVal();

  SELECT count(*) INTO v_count FROM XMLTable ('declare namespace gml="http://www.opengis.net/gml/3.2"; (: :)
                                             //polygon' PASSING v_gml);

  If v_count > 0 THEN

    sql_stmt := 'WITH gml_input AS (SELECT XMLType ('''||v_gml_clob||''') as gmldata from dual)
                 select poly.spatial_location from gml_input,
                                                 xmltable (xmlnamespaces (''http://www.opengis.net/gml/3.2'' as "gml"),
                                                          ''GeometryComponents/polygon/gml:Polygon''
                                                           PASSING gmldata
                                                           COLUMNS
                                                           spatial_location XMLTYPE PATH ''//gml:Polygon'') poly
                 UNION ALL
                 select point.spatial_location from gml_input,
                                                 xmltable (xmlnamespaces (''http://www.opengis.net/gml/3.2'' as "gml"),
                                                          ''GeometryComponents/polygon/gml:Point''
                                                           PASSING gmldata
                                                           COLUMNS
                                                           spatial_location XMLTYPE PATH ''//gml:Point'') point';
--    dbms_output.put_line (sql_stmt);


    OPEN c_geoms FOR sql_stmt;

    LOOP

      FETCH c_geoms INTO v_gml_rec;
      EXIT WHEN c_geoms%NOTFOUND;

      v_gml_clob_rec := v_gml_rec.getClobVal;

      sql_stmt := 'SELECT SDO_CS.TRANSFORM(SDO_UTIL.FROM_GML311GEOMETRY ('''||v_gml_clob_rec||'''), 8307) FROM dual';

      EXECUTE IMMEDIATE sql_stmt INTO v_sdogeom;
 
      varray_sdogeom.EXTEND;

      varray_sdogeom(varray_sdogeom.COUNT) := v_sdogeom;

    END LOOP;   -- c_geoms fetch

    CLOSE c_geoms;

    select SDO_AGGR_SET_UNION(varray_sdogeom, 0.005) INTO v_sdogeom_all from dual;

  END IF;  -- v_count > 0

RETURN v_sdogeom_all;

END IF;

END MULTI_GML_TO_SDOGEOM;
/

show errors
Unfortunately I can't add the data, I'm processing as it is classified, but here's a dummy sample of the type of GML, I'm analysis although this is short enough to make it work:
<GeometryComponents xmlns:gml="http://www.opengis.net/gml/3.2">
<polygon xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:mgmp="http://www.mod.uk/mgmp" xmlns:smr="http://www.mod.uk/smr"
xmlns:xlink="http://www.w3.org/1999/xlink"><gml:Polygon gml:id="bp2" srsName="EPSG:4326">
<gml:exterior>
<gml:LinearRing>
<gml:posList srsDimension="2">175 -40 176 -40 176 -39 175 -39 175 -40</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</polygon>
</GeometryComponents>
And even if this function is normally called by procedure, this is a double call
 select MULTI_GML_TO_SDOGEOM ('<GeometryComponents xmlns:gml="http://www.opengis.net/gml/3.2">
<polygon xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:mgmp="http://www.mod.uk/mgmp" xmlns:smr="http://www.mod.uk/smr"
xmlns:xlink="http://www.w3.org/1999/xlink"><gml:Polygon gml:id="bp2" srsName="EPSG:4326">
<gml:exterior>
<gml:LinearRing>
<gml:posList srsDimension="2">175 -40 176 -40 176 -39 175 -39 175 -40</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</polygon>
</GeometryComponents>') from dual;
Thanks in advance.

Hello

I don't see why you use dynamic SQL statements here.
As mentioned above, you do a lot of things wrong and unnecessary, the first being not not using bind variables.
So, I see many serialization/construction on XMLType which only adds more load.

Basically, the function can be simplified to:

create or replace function multi_gml_to_sdogeom (
  geometry_components in clob
)
return sdo_geometry
is

  v_sdogeom_all       SDO_GEOMETRY;

begin

  select SDO_AGGR_SET_UNION(
           cast(
             collect(
               SDO_CS.TRANSFORM(SDO_UTIL.FROM_GML311GEOMETRY(spatial_location), 8307)
             )
             as sdo_geometry_array
           )
         , .005
         )
  into v_sdogeom_all
  from (
    select xmlserialize(content x.column_value) as spatial_location
    from xmltable(
           xmlnamespaces ('http://www.opengis.net/gml/3.2' as "gml")
         , '/GeometryComponents/polygon/(gml:Polygon|gml:Point)'
           passing xmlparse(document geometry_components)
         ) x
  ) ;

  return v_sdogeom_all;

end;
SQL> select multi_gml_to_sdogeom('
  2  
  5  
  6  
  7  175 -40 176 -40 176 -39 175 -39 175 -40
  8  
  9  
 10  
 11  
 12      45.67, 88.56
 13    
 14  
 15  ')
 16  from dual ;

MULTI_GML_TO_SDOGEOM('
 

Published by: odie_63 on 8 Jan. 2013 18:02

Tags: Database

Similar Questions

  • How can I get two jobs when using two monitors, instead of stretching a desktop on both screens?

    Hello!

    How can I get two jobs when using two monitors, instead of stretching a desktop on both screens? I n ' want to clone my office, and I don't want to stretch it. I want two desktop computers, where I can "send/give" to the other desktop programs.

    I need a third party program? It is very good. If you know one please tell me about it.

    Hi OskarKvist,

    This feature is not supported by Windows XP.

    However, you can use your favorite search engine to download any third-party software that could serve the purpose.

    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope the helps of information.

  • Get the error when using the UTL_SMTP function in Oracle 11 g

    Hello

    I get the error when executing a trigger e-mail code in oracle 11 g:

    I have following trigger on the temporary table:

    CREATE OR REPLACE TRIGGER temp_temp_message AFTER

    INSERT OR UPDATE ON temp_message FOR EACH LINE

    declare

    Conn UTL_SMTP . CONNECTION ;

    msg VARCHAR2 (2000);

    Start

    Conn := UTL_SMTP . open_connection ( host => '10.250.1.149', port=>25 );

    UTL_SMTP . HELO ( conn, '10.250.1.149');

    UTL_SMTP . mail ( conn, '[email protected]');

    UTL_SMTP . RCPT () conn ' [email protected]');

    msg := "Hello, this is test mail." ;

    UTL_SMTP .data( conn, msg);

    UTL_SMTP . quit smoking ( conn );

    exception when others then

    dbms_output.put_line (sqlerrm);

    raise_application_error (-20000,

    "Failed to send because of the following error messages: ' " || sqlerrm);

    end;

    Insert in temp_message values ()1

    );

    When I insert the record in the table there are given the following error.

    ORA-20000: failed to send messages because of the following error: ORA-24247: access denied by access control (ACL) of network list

    ORA-06512: at the 'APPS '. TEMP_TEMP_MESSAGE', line 14

    ORA-04088: error during execution of trigger ' APPS. TEMP_TEMP_MESSAGE'

    But if I run the next plsql through sqlplus send mail successfully:

    declare

    Conn UTL_SMTP . CONNECTION ;

    MSG VARCHAR2 (2000);

    Start

    Conn := UTL_SMTP . open_connection ( host => '10.250.1.149', port=>25 );

    UTL_SMTP . HELO ( conn, '10.250.1.149');

    UTL_SMTP . mail ( conn, '[email protected]');

    UTL_SMTP . RCPT () conn ' [email protected]');

    msg := "Hello, this is test mail." ;

    UTL_SMTP .data( conn, msg);

    UTL_SMTP . quit smoking ( conn );

    exception when others then

    dbms_output.put_line (sqlerrm);

    raise_application_error (-20000,

    "Failed to send because of the following error messages: ' " || sqlerrm);

    end;

    Thanks in advance.

    Yoann

    To resolve ORA-24247 you must:

    (1) create an acl (if it is not already created)

    (2) add the user privileges using the resources of the network

    (3) to use the ACL to a specific address

    This might be useful

    How to fix an ORA-24247: access denied by access control (ACL) of network list | DB tips

  • Why do I get System.String [] when I export to CSV format instead of the data that I'm looing?

    I HAV a real simple script that pulls information about DNS configuration & my ESXi hosts routing settings. version of ESXi 4.1 is

    Get-VMHost | Get-VMHostNetwork | Select VMHost, VMKernelGateway, DnsAddress, DnsFromDhcp, hostname, domain name SearchDomain

    When I use the above script I get the result on the screen I want to see:

    $vmhost: MyHostDisplayName1

    VMKernelGateway: 10.10.10.10

    DnsAddress: {10.10.10.11, 10.10.10.12}

    DnsFromDhcp: false

    HostName: MyHostName1

    Domain name: MyDomainName.local

    SearchDomain: {MyDomainName.local}

    When I try to channel this output in CSV format, I find myself with a problem:

    Get-VMHost | Get-VMHostNetwork | Select VMHost, VMKernelGateway, DnsAddress, DnsFromDhcp, hostname, domain name SearchDomain | Export-Csv C:\VMHostDNSinfo.csv

    My CSV does not show the SearchDomain or the DnsAddress. How to replace the [System.Stinr] with a correct output?

    VMHost

    VMKernelGateway

    DnsAddress

    DnsFromDhcp

    Host name

    Domain name

    SearchDomain

    MyHostDisplayName1

    10.10.10.10

    System.String]

    FAKE

    MyHostName1

    MyDomainName.local

    System.String]

    MyHostDisplayName2

    10.10.10.9

    System.String]

    FAKE

    MyHostName2

    MyDomainName.local

    System.String]

    MyHostDisplayName3

    10.10.10.8

    System.String]

    FAKE

    MyHostName3

    MyDomainName.local

    System.String]

    You must convert arrays to strings before exporting them one. CSV file. You can do this with the following script:

    Get-VMHost | Get-VMHostNetwork | `
    Select-Object VMHost, VMKernelGateway,
      @{N="DnsAddress";E={[string]::Join(",",$_.DnsAddress)}},
      DnsFromDhcp, HostName, DomainName,
      @{N="SearchDomain";E={[string]::Join(",",$_.SearchDomain)}} | `
    Export-Csv -Path VMHostDNSinfo.csv -NoTypeInformation -UseCulture
    

    Best regards, Robert

  • Get the error when using remove child

    Hi try to use remove the child I get the following error in the output panel

    Hide videos and learn the buttons
    video removed
    ArgumentError: Error #2025: the supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at DSE_MAIN_dizzy3_fla::MainTimeline/removeMedia()
    at DSE_MAIN_dizzy3_fla::MainTimeline/setNewMedia()
    at DSE_MAIN_dizzy3_fla::MainTimeline/onIntroClick()

    I think that the function that generated the error is called removeMedia()

    This function is called from another function that is called by a buttonpress

    function removeMedia() {}
    If (myVideo! = null) {//Check that a video is on the scene
    myVideo.stop (); / / stop the video so don't continue to play sound
    this.removeChild (myVideo); / / deletion of the video being step
    trace ("video deleted");
    }
    If (myLearn! = null) {//Check that an element of learning is on stage
    removeChild (myLearn); / / Remove swf of the stadium's current learning
    trace ("learning removed swf");
    }
    }

    I tried to parent.removeChild (myVideo);

    and parent.removeChild (myVideo);

    but I got the same error

    Don't know how to fix it or why? its probably something simple I'm missing, any help would be appreciated

    Heres the code in its entirety if you need


    / / Code witten by [email protected]

    Stop(); / / Stop to this framework

    Add the Classes required for the application-
    import fl.containers.UILoader;// import uiLoader class to display the elements of learning
    import flash.display.LoaderInfo;// import (required to load flash Vars) class loaderInfo
    import import the FLVPlayback class fl.video.*;// (required for playback of flv)
    FlashVars are passed to this application since the html/php page
    myFolder is the name of the FlashVar and contains the path to the flv file
    and learning of the swf file


    Configure the application variables-
    var mySection:String; / / define a variable to hold the current section, we
    MySection = "intro"; / / because it is the first picture on the variable intro MySection
    var myFlv:String; / / define a variable to hold the name of the current flv to play
    myFlv = "loaded dse_introvideo.flv";// like this just to put the variable myFlv for intro.flv.
    var mySwf:String; / / define a variable to hold the name of the element of swf of learning to play
    no need to name mySwf yet as we are in the intro of the article
    var mySecType:String; / / set a variable to contain the type of section 'video' or 'learning '.
    mySecType = 'video '; / / We start playing the videos in order to define us the type of section to the video

    // VIDEO STUFF --------------------------------------------------------------------
    var myVideo:FLVPlayback = new FLVPlayback(); / / create a new FLVPlayback object to contain the video
    myVideo.width = 544;             Set the width of the video
    myVideo.height = 304;           adjust the height of the video
    myVideo.x = 200;                  set the horizontal position of the video
    myVideo.y = 88;                    set the vertical position of the video
    set the skin to control videos
    We read the variable called myFolder that is passed to us from the web page
    my file contains path information to the customers on the Web site directory
    If (this.loaderInfo.parameters.myFolder! = undefined) {/ / check if all flashvars passed through}
    If flashvars adopted include myFolder the path to the external file of the skin
    myVideo.skin = (this.loaderInfo.parameters.myFolder + "SkinUnderPlayStopSeekMuteVol.swf");
    } else {}
    If no flashvars are passed through the skin without the additional path value
    myVideo.skin = "SkinUnderPlayStopSeekMuteVol.swf";
    }
    myVideo.source = myFlv; / / set the video source to the current video stored in the variable myFlv
    addChild (myVideo); / / put the video on the stage
    // END VIDEO STUFF-----------------------------------------------------------------

    // LEARNING STUFF ---------------------------------------------------------------
    var myLearn:UILoader = new UILoader(); / / create a new UIloader to contain the element learing
    myLearn.width = 544;                          Set the width of the element of learning
    myLearn.height = 304;                         define learning points height
    myLearn.x = 200;                              set the horizontal position of the element of learning
    myLearn.y = 88;                              set the vertical position of the element of learning

    We need hide the video and the buttons of learning that they must not be shown again
    This function called viewButtons that will
    to call the function, we use viewButtons ("show"); to show them
    and viewButtons ("hide"); to hide
    function viewButtons(mySwitch:String) {}
    If (mySwitch == 'view') {}
    This.vid_btn. Visible = true;                              show the button of the vid
    This.learn_btn. Visible = true;                              See him learn button
    This.button_bkg. Visible = true;                         show the button background
    trace ("see the video and discover the buttons");          hide the button background
    }
    If (mySwitch == 'Hide') {}
    This.vid_btn. Visible = false;               Hide button vid
    This.learn_btn. Visible = false;               Learn how to hide the button
    background of the This.button_bkg button. Visible = false //hide
    trace ("Hide videos and learn the buttons");
    }
    }
    viewButtons ("hide");               turn the video and learning off because buttons are not necessary
    //END LEARNING STUFF------------------------------------------------------------

    MEDIA FUNCTIONS
    function to delete the current item of the scene.
    function removeMedia() {}
    If (myVideo! = null) {//Check that a video is on the scene
    myVideo.stop ();                    stop the video so don't continue to play sound
    this.removeChild (myVideo);     delete the video being step
    trace ("video deleted");
    }
    If (myLearn! = null) {//Check that an element of learning is on stage
    removeChild (myLearn);               Remove swf of the stadium's current learning
    trace ("learning removed swf");
    }
    }

    function setNewMedia() {/ / function to play the swf or flv files media}
    removeMedia (); call the function removeMedia to stop and remove no matter what media on the scene
    If (mySecType == "video") {//if we're in the video section
    myVideo.source = myFlv;               load and play the new video
    addChild (myVideo);                    put video on stage
    trace ("added videos");
    }
    If (mySecType == "learn") {//if we're in the learning section
    myLearn.source = mySwf;               Load point learning
    addChild (myLearn);                    the point of learning on stage
    trace ("added learning item");
    }
    }

    SET UP THE BUTTONS ON THE STAGE-
    INTRO BUTTON
    function onIntroClick(event:MouseEvent):void {}
    myFlv = "dse_introVideo.flv";                    put the video to load
    viewButtons ("hide");                         hide the video and learning buttons
    setNewMedia();                              load in the media
    }
    set the function to the button intro
    intro_btn.addEventListener (MouseEvent.CLICK, onIntroClick);


    VIDEO BUTTON
    function onVideoClick(event:MouseEvent):void {}
    mySecType = 'video ';                    section under video
    setNewMedia();                              load in the media
    }
    set the function to the button intro
    vid_btn.addEventListener (MouseEvent.CLICK, onVideoClick);


    TEACH BUTTON
    function onLearnClick(event:MouseEvent):void {}
    mySecType = "learn."
    setNewMedia(); / / load in the media
    }
    set the function to the learn button
    learn_btn.addEventListener (MouseEvent.CLICK, onLearnClick);


    COMPUTER BUTTON
    function onComputerClick(event:MouseEvent):void {}
    myFlv = "dse_computerVideo.flv";//set the video to load.
    viewButtons ("show"); show the video buttons and learning
    setNewMedia(); / / load in the media

    }
    set the function to the computer button
    computer_btn.addEventListener (MouseEvent.CLICK, onComputerClick);

    BUTTON OF POSTURE
    function onPostureClick(event:MouseEvent):void {}
    myFlv="dse_postureVideo.flv";//set the video to load
    viewButtons ("show"); show the video buttons and learning
    setNewMedia(); / / load in the media
    }

    posture_btn.addEventListener (MouseEvent.CLICK, onPostureClick);

    Ah, looked carefully at the code, and I think I found the problem.

    You call removeChild for BOTH myVideo and myLearn - when the only one of them is on the display list.

    The if() statement could catch it, BUT you check if they are null, not if they are on the display list.  An object can be non-null and not be on the display list.

    The simplest method (also somewhat sloppy method) to get rid of this would be to add a try/catch around two of these calls removeChild.

    try {}

    removeChild (myVideo);

    } catch (e) {}

    try {}

    removeChild (myLearn);

    } catch (e) {}

    It's messy, it triggers the error again, but it immediately masks because you caught and did nothing, but the error is no longer displayed.

  • Get exceptions expired when using HttpConnection

    I'm reading the information from a site, for example ("http://www.mysite.com/page.html") in my application.  I'm doing a call on the site using Connector.open ("http://www.mysite.com/page.html"), but the connection just times out.

    I also tried to set deviceside = true, as written here: http://digitalsonata.blogspot.com/2009/04/blackberry-connection-tip.html, but that no longer works.

    I am currently having this run on a device with an OS to v4.5.  It works fine on the device Simulator, but it fails as described when it is deployed on a real device.

    All ideas of code examples on reading my site would be appreciated.  Thank you.

    « ; deviceside = true' by itself, without parameters APN or WAP specific carrier, is not going to work on 90% of carriers.

    See the sticky thread on this forum of Peter Strange for more information.

    Also see this article:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

  • How to get all values when using IN paragraph?

    Hi all

    create the table test_case

    as

    Select ' AB-101' ord_no, to_date('06/17/2015','mm/dd/yyyy') dr_date, dr_type 'AB', 'ABC' double dr_name.

    Union of all the

    Select ' AB-100', to_date (' 17/04/2015 ',' mm/dd/yyyy'), 'AB', ' ABC' of the double

    Union of all the

    Select '124', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'BB', 'BBA' from dual

    Union of all the

    Select '123', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'BB', 'BBA' from dual

    Union of all the

    Select '145', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'CC', "CCA" to double

    Union of all the

    Select '144', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'CC', "CCA" to double

    Getting output

    AB-10117/06/2015ABABC
    AB-10017/04/2015ABABC
    12406/07/2015BBBBA
    12306/07/2015BBBBA
    14506/07/2015CCCOMMON COUNTRY ASSESSMENT
    14406/07/2015CCCOMMON COUNTRY ASSESSMENT

    Expected O/p

    Select max (ord_no), max (dr_date), max (dr_type), max (dr_name) of

    where test_case

    and dr_type in('AB','BB','CC')

    I have to use dr_type in ('AB', 'BB', 'CC')

    AB-10117/06/2015ABABC
    12406/07/2015BBBBA
    14506/07/2015CCCOMMON COUNTRY ASSESSMENT

    Are there opportunities to use CASE?

    Hello

    Rajesh123 wrote:

    Hi all

    create the table test_case

    as

    Select ' AB-101' ord_no, to_date('06/17/2015','mm/dd/yyyy') dr_date, dr_type 'AB', 'ABC' double dr_name.

    Union of all the

    Select ' AB-100', to_date (' 17/04/2015 ',' mm/dd/yyyy'), 'AB', ' ABC' of the double

    Union of all the

    Select '124', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'BB', 'BBA' from dual

    Union of all the

    Select '123', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'BB', 'BBA' from dual

    Union of all the

    Select '145', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'CC', "CCA" to double

    Union of all the

    Select '144', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'CC', "CCA" to double

    Getting output

    AB-101 17/06/2015 AB ABC
    AB-100 17/04/2015 AB ABC
    124 06/07/2015 BB BBA
    123 06/07/2015 BB BBA
    145 06/07/2015 CC COMMON COUNTRY ASSESSMENT
    144 06/07/2015 CC COMMON COUNTRY ASSESSMENT

    Expected O/p

    Select max (ord_no), max (dr_date), max (dr_type), max (dr_name) of

    where test_case

    and dr_type in('AB','BB','CC')

    I have to use dr_type in ('AB', 'BB', 'CC')

    AB-101 17/06/2015 AB ABC
    124 06/07/2015 BB BBA
    145 06/07/2015 CC COMMON COUNTRY ASSESSMENT

    Are there opportunities to use CASE?

    If you want a separate line of output for each distinct value of dr_type, then use GROUP BY dr_type.

    For example:

    SELECT MAX (ord_no) AS max_ord_no

    MAX (dr_date) AS max_dr_date

    , dr_type - no need to MAX here

    MAX (dr_name) AS max_dr_name

    FROM test_case

    WHERE dr_type IN ('AB', 'BB', 'CC')

    GROUP BY dr_type

    ;

  • Get the error when using odiRef.getPop ("POP_NAME")

    Hello

    I try inserting the name of the interface running as IKM step below added command.

    INSERT THE TSG. CNTL_TAB VALUES (NULL, '< %=odiRef.getPop("POP_NAME")% >', SYSDATE, NULL)

    When I try to update the same record inserted into a new stage, it is in error. Here is the command to update that I use this step to end in IKM.

    Update on TSG. The endtime value CNTL_TAB = sysdate where rid in)
    Select max (RID) in STG. CNTL_TABE where interface_name in (select "< % = ODIREF.") GETPOP("POP_NAME") % > ' double)
    )

    It gives a BeanShell script error


    BeanShell script error: source file: online assessment: "out.print ("update STG. The endtime value CNTL_TABE = sysdate where r_i... ": Try to set the method: GETPOP() on the name of a variable or a class undefined: ODIREF: line: 2: in file: online assessment:" out.print ("updateSTG.CNTL_TABE endtime = sysdate value where the ri...") ": ODIREF. GETPOP ("POP_NAME")
    Info OSB: update online control panel: column 0: columnNo
    out. Print ("update STG. The endtime value CNTL_TAB = sysdate where rid in (\nselectionnez (RID) max of ILI. CNTL_TABE where ' \n interface_name in (select "" ");
    out. Print (ODIREF. GETPOP ("POP_NAME"));
    out. (Print (» «dele de double) \n) ");


    Please let me know how to solve this problem.

    Thanks in advance.

    Published by: user617073 on September 18, 2012 18:51

    user617073 wrote:
    Hello

    I try inserting the name of the interface running as IKM step below added command.

    INSERT THE TSG. CNTL_TAB VALUES (NULL, '<%=odiRef.getPop("POP_NAME")%>', SYSDATE, NULL)

    When I try to update the same record inserted into a new stage, it is in error. Here is the command to update that I use this step to end in IKM.

    Update on TSG. The endtime value CNTL_TAB = sysdate where rid in)
    Select max (RID) in STG. CNTL_TABE where interface_name in (select ' < %="ODIREF." getpop("pop_name")="" %=""> ' of the double)
    )

    It should be odiRef.getPop ("POP_NAME")
    see the case difference

    It gives a BeanShell script error

    BeanShell script error: source file: online assessment: "out.print ("update STG. The endtime value CNTL_TABE = sysdate where r_i... ": Try to set the method: GETPOP() on the name of a variable or a class undefined: ODIREF: line: 2: in file: online assessment:" out.print ("updateSTG.CNTL_TABE endtime = sysdate value where the ri...") ": ODIREF. GETPOP ("POP_NAME")
    Info OSB: update online control panel: column 0: columnNo
    out. Print ("update STG. The endtime value CNTL_TAB = sysdate where rid in (\nselectionnez (RID) max of ILI. CNTL_TABE where ' \n interface_name in (select "" ");
    out. Print (ODIREF. GETPOP ("POP_NAME"));
    out. (Print (» «dele de double) \n) ");

    Please let me know how to solve this problem.

    Thanks in advance.

    Published by: user617073 on September 18, 2012 18:51

  • I can't get the video when using firefox. I know it's a problem with firefox because I get video when you use internet explorer or google chrome.

    Plug-ins are updated. I can't understand what is wrong. He started from nothing and I have no other problems.

    Recent crashes of some multimedia content (this includes the Youtube videos, some flash games and other applications), in collaboration with Firefox 14 are probably caused by a recent update of Flash 11.3 and/or Real Player browser plugin to malfunction.

    To resolve this problem, follow the steps in these articles in the Knowledge Base:

    Flash Plugin - maintain and troubleshoot

    Adobe Flash plugin has crashed - avoid that it happen

    11.3 Flash does not load video in Firefox

    We'll find other information on more technical issues under these links:

    http://forums.Adobe.com/thread/1018071?TSTART=0

    http://blogs.Adobe.com/asset/2012/06/inside-Flash-Player-protected-mode-for-Firefox.html

    Please tell us if it helped!

  • dbms_crypto - avoid error when using different key in lower environment

    Hello Experts,

    We use Oracle 11.2.0.2. We intend to implement dbms_crypto to encrypt some columns. Clone us the production data at the lower environment (DEV, QC).

    The lowest environments, we do not want to obtain the sensitive data from production and do not plan to use the same key. Instead of getting an error when using different keys, is it possible to get a different set of results.

    In other words, we want the implementation will be same in environments but use a different key in lower environment and obtain different results (or garbage).

    Any suggestions would be greatly appreciated.

    The test of this logic, I get following error when using the different keys to decrypt. It works fine if I use the same key.
    Error on line 1
    ORA-28817: PL/SQL function has returned an error.
    ORA-06512: at "SYS." DBMS_CRYPTO_FFI', line 67
    ORA-06512: at "SYS." DBMS_CRYPTO", line 44
    ORA-06512: at line 19
    DECLARE
      l_credit_card_no    VARCHAR2(19) := '1234 5678 9012 3456';
      l_ccn_raw           RAW(128) := UTL_RAW.cast_to_raw(l_credit_card_no);
     
     l_key               RAW(128) := UTL_RAW.cast_to_raw('abcdefgh');
       l2_key               RAW(128) := UTL_RAW.cast_to_raw('12345678');
    
      l_encrypted_raw     RAW(2048);
      l_decrypted_raw     RAW(2048);
    BEGIN
      DBMS_OUTPUT.put_line('Original  : ' || l_credit_card_no);
    
      l_encrypted_raw := DBMS_CRYPTO.encrypt(src => l_ccn_raw, 
                                             typ => DBMS_CRYPTO.des_cbc_pkcs5, 
                                             key => l_key);
    
      DBMS_OUTPUT.put_line('Encrypted : ' || RAWTOHEX(UTL_RAW.cast_to_raw(l_encrypted_raw)));
    
      l_decrypted_raw := DBMS_CRYPTO.decrypt(src => l_encrypted_raw, 
                                             typ => DBMS_CRYPTO.des_cbc_pkcs5, 
                                             key => l2_key); --**Using different key to decrypt
    
      DBMS_OUTPUT.put_line('Decrypted : ' || UTL_RAW.cast_to_varchar2(l_decrypted_raw));
    END;
    Thank you.

    In general, you can't get different results in different environments, no.

    Of course, you could write your routine to decrypt so that it intercepts it and returns a random string of RAW.

    However, this is not normally the way people go on hiding sensitive data in environments below. It would be much more common to use a tool that is designed for this tool. For example, Oracle has a Pack of masking of data for Enterprise Manager that allows to replace sensitive data with false, but realistic data as part of the updating of the environments below. There are also data from third-party tools like masqueur datamasking.

    Justin

  • My web site have a blank space in the right side when using chrome

    It seems perfectly on Safari, desktop and mobile, but in my android phone, I use chrome and nothing when I get this white ditch on the right. I even test in resizer to google to check it out and it seems fine. I only get this problem when using chrome. Has it to do with the fact that I'm the test catalyst for business?

    I think it's a bug. because when I delete some items, it works well and everything seems to be good.

    Please help me!

    Here is the link to the site

    http://bufeteostos02.BusinessCatalyst.com/index.html

    Thanks for sharing the file with me.

    You have created a black rectangle in the home page to give it a black background. This rectangle is the origin of the problem.

    I tried now to get rid of the question.

    1 remove the black rectangle of the homepage.

    2. go in the master page and fill color of the browser set to black.

    3 publish the file and it works perfectly.

    I am also you send the file with my changes.

    Kind regards

    Vivek

  • Oracle TEXT and using "ABOUT" as a literal string, not a command

    We have a hint of context on a NAME column, and we get an error when searching on the string
    CONTAINS(name, '%ALL ABOUT TRAVEL%') > 0
    A query on ALL ABOUT and works ON THE TRIPS, but all of the sentence is a problem. I found since EVERYTHING is a key word when you use CONTAINS ().

    So, is there a way to escape ABOUT, include it in double quotes, etc., so that it gets treated as a string literal?

    Thank you
    -= Chuck

    Try to include in the curly brackets {}

    Max
    http://oracleitalia.WordPress.com

  • Format string when to get database

    Hi all

    I have problem when the display string that is based on form data.

    Here is the sample code for this problem:

    var str:String = "this is the first sentence. \n And here's the second sentence.

    ...

    < s:Label text = "{str}" / >

    = > put the output:

    Here is the first sentence.

    And here's the second sentence

    but when I get this string of SQL database, put: here is the first sentence. \n And here's the second sentence

    There are no spacing see what character '\n '.

    I hope someone can help me.

    Thank you and sorry for my bad English.

    It would be unusual for a two-character string "-" and "n" to represent the new lines when it is kept in databases or files.  The '\n' is usually converted by the compilers or interpreters in the correct characters.  You might want to look at how this is happening and change before it is stored.

    But if you can not change it before it is stored, I believe you can use the following to convert

    var fixedString:String = string.replace(/\\n/g, "\n");
    
  • Why can I never get a good picture on my imac when using Skype?

    Why can I never get a good picture on my imac when using Skype?

    I use the free Skype to talk to my friend in China every week. They always see me on their computer or phone clearly, but I can never get a good video of them, clues why? I see a good image of myself, but never of them. I can't adjust the settings of the built-in camera because they are fixed. Is this my router modem, which is 8 years old now. What is causing this problem. If you look on YouTube there are hundreds and thousands of good quality webcam videos then why am I having this eternal problem year after year? I've got El Capitan OSX

    If they can see you clearly, the problem is not on your side - at least not in your Mac. Could be the router or you internet connection. Otherwise: https://support.skype.com/en/skype/mac/

  • When using YouTube, I get foreign on-screen words. This does not happen with Safari.

    When using YouTube, I get foreign on-screen words. This does not happen with Safari.

    Clear the cache and cookies only from Web sites that are causing problems.

    "Clear the Cache":

    • Firefox > Preferences > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox > Preferences > privacy > Cookies: "show the Cookies".

    You can write a check for corrupted fonts and duplicate and other police issues:

Maybe you are looking for