V$sqlarea encoding

I have plsql code looking something like that:
if v_state_flag = 'S' and v_next_query = 'Y' then
      PKG_COMMON.DEBUG ('GET_ADDRESS_LEVEL_LIST.30, fill o_state_list');
      -- kui #postal_flag = 'Y' ja #postalcode on antud, siis lisada klausel
      if v_postalcode_flag = 'S' and i_postal_code is not null then
         open o_state_list for
            select reg.CODE, reg.NAME from V_REGION_LANG reg
            where reg.LANGUAGE = PKG_SESSION.LANGUAGE_CODE
               and reg.COUNTRY = i_country
               and reg.REGION_LEVEL = 'STATE'
               and reg.CLOSED_TIME is null
               -- kui #postal_flag = 'Y' ja #postalcode on antud, siis lisada klausel
               and reg.CODE in (
               select r.REGION_CODE1 from REGION r, POSTALCODE p
               where r.COUNTRY = p.COUNTRY
               and r.CODE = p.REGION_CODE
               and p.POSTALCODE = i_postal_code
               and p.CLOSED_TIME is null
               );       View "v$sqlarea" shows this query as:
select * from v$sqlarea where
last_active_time > sysdate - 2
and sql_text like '%REG.CODE, REG.NAME%'
SELECT REG.CODE, REG.NAME FROM V_REGION_LANG REG
WHERE REG.LANGUAGE = PKG_SESSION.LANGUAGE_CODE
AND REG.COUNTRY = :B1 AND REG.REGION_LEVEL = 'STATE' AND REG.CLOSED_TIME IS NULL
;We have " :B1" in query, it stands for plsql parameter "i_country". But we have call to package function "PKG_SESSION.LANGUAGE_CODE" in v$sqlarea query- why wasn't this function replaced with ":B15" for example?
Why plsql parameters are replaced with ":B5" but package functions not?
Does the "PKG_SESSION.LANGUAGE_CODE" in query makes the query slower?

PL/SQL variables by default act as Bind Variables when you use them in SQL. But PACKAGE functions or standalone functions are not bind variables.
If you dont want the package name to appear in the SQL area then you need to change the SQL to use a bind variable.
Something like this
if v_state_flag = 'S' and v_next_query = 'Y' then
      PKG_COMMON.DEBUG ('GET_ADDRESS_LEVEL_LIST.30, fill o_state_list');
      my_value :=  PKG_SESSION.LANGUAGE_CODE;      
      -- kui #postal_flag = 'Y' ja #postalcode on antud, siis lisada klausel
      if v_postalcode_flag = 'S' and i_postal_code is not null then
         open o_state_list for
            select reg.CODE, reg.NAME from V_REGION_LANG reg
            where reg.LANGUAGE = my_value
               and reg.COUNTRY = i_country
               and reg.REGION_LEVEL = 'STATE'
               and reg.CLOSED_TIME is null
               -- kui #postal_flag = 'Y' ja #postalcode on antud, siis lisada klausel
               and reg.CODE in (
               select r.REGION_CODE1 from REGION r, POSTALCODE p
               where r.COUNTRY = p.COUNTRY
               and r.CODE = p.REGION_CODE
               and p.POSTALCODE = i_postal_code
               and p.CLOSED_TIME is null
               );By doing this you execute the package function only once. But when you use it in a SQL directly you execute it for every row.

Similar Messages

  • Adobe media encoder error in photoshop

    Hi everyone!This morning i have tried to render a video timelapse in photoshop but it showed to me an error which says:''Could not complete the render video command because of a problem with Adobe Media Encoder''.Could anyone tell me how can i fix this error?

    Nobody can tell you anything without proper system info or other technical details like exact versions, render settings, details about the source files and so on.
    Mylenium

  • Filename in Media Encoder CC

    Hello there ;-)
    In After Effect CC u can render picture sequences using a filname like: "Project_[#####].jpg". The [#####] is replaced by the framenumber when rendering. When i render a picture sequenc in Media Encoder CC i Don´t have that oportunity. It allways starts with a Number like 000001. My Question - is it possible to change that in the encoder? So that i have the Frame number in the filename like in After Effect CC? If yes - how? I haven´t find anything!
    THANX for your help!

    I have this issue too. It makes After effects impossible to use with media encoder.  What we want is the actual frame number from After effects
    Example
    I have a 5000 frame AE export.
    I can export the lot from AME
    Render0000.png - Render5000.png
    Client makes a change to Frames 4500-5000
    Try and render Work area to AME
    Result = Render0001.png -  Render0499.png
    The only way to keep file numbers is to use AE's render Queue which seem to be way slower than AME?

  • Conversion of XML file from ANSI to UTF-8 encoding in SAP 4.6C

    Hi All,
      Im working on SAP 4.6C version.I have generated a XML file from my custom report.It is downloading in ANSI format.But i need to download this into UTF-8 format.So can anyone please let me know how to do this?
    Is this possible in 4.6C version?
    Thanks in Advance,
    Aruna A N

    Hello
    It is possible in 4.6.
    Try this code:
    REPORT Z_TEST_XML_DOWN .
    data:
      lp_ixml type ref to if_ixml,
      lp_xdoc type ref to if_ixml_document,
      lp_sfac type ref to if_ixml_stream_factory,
      lp_ostr type ref to if_ixml_ostream,
      lp_rend type ref to if_ixml_renderer,
      lp_enco type ref to if_ixml_encoding.
    data:
      lp_root type ref to if_ixml_element,
      lp_coll type ref to if_ixml_element,
      lp_elem type ref to if_ixml_element.
    class cl_ixml definition load.
    data:
    udat like lfa1,
    s type string.
    select single * from lfa1 into udat where lifnr = '0000000001'. " <- set here real number
    *** create xml
    lp_ixml = cl_ixml=>create( ).
    lp_xdoc = lp_ixml->create_document( ).
    lp_root = lp_xdoc->create_simple_element( name = 'Node'
                                              parent = lp_xdoc ).
    s = udat-land1.
    call method lp_root->set_attribute( name = 'country_name'
                                        value = s ).
    s = udat-name1.
    call method lp_root->set_attribute( name = 'vendor_name'
                                        value = s ).
    s = udat-ort01.
    call method lp_root->set_attribute( name = 'city_name'
                                        value = s ).
    *** render xml
    types: begin of xml_tab_line,
             line(256) type x,
           end of xml_tab_line.
    types: xtab type table of xml_tab_line.
    data: t_xml type xtab,
          size type i,
          rc type i.
    lp_sfac = lp_ixml->create_stream_factory( ).
    lp_ostr = lp_sfac->create_ostream_itable( table = t_xml ).
    lp_enco = lp_ixml->create_encoding( character_set = 'utf-8'
                                   byte_order = if_ixml_encoding=>co_none ).
    call method lp_ostr->set_encoding( encoding = lp_enco ).
    lp_rend = lp_ixml->create_renderer( ostream = lp_ostr
                                        document = lp_xdoc ).
    rc = lp_rend->render( ).
    *** export to file
    size = lp_ostr->get_num_written_raw( ).
    call function 'WS_DOWNLOAD'
      exporting
        bin_filesize = size
        filename = 'c:\sapxml_test.xml'
        filetype = 'BIN'
      tables
        data_tab = t_xml
      exceptions
        others = 1.
    It is just simple example.

  • Media Encoder CC mpeg2 Question

    Basically what the title says. Where exactly is the option to format a video into an mpeg2 file? I've been Googling this to death. I know I've seen some people say they had it, then it disappeared. But I literally just downloaded Media Encoder and its nowhere to be found. Even under the DVD and Blue-ray section, the only options are for Blue-ray. I need to burn a wedding video onto a DVD. Is there something special you have to do to get this done? Are there limits on the free trial version that don't allow mpeg2 downloads? Help!

    Are you using AME CC 2014?  MPEG2 is included in AME under more strict license than other formats and is only activated only if you have Premiere Pro CC 2014, AfterEffects CC 2014 or Prelude CC 2014.  If you are using them under a free trial, MPEG2 becomes unavailable after a trial period expires.  After a trial has been expired, AME CC 2014 can be used extra 30 more days, but without MPEG2. 
    If you already used up a trial period, you can either 1) install one of three apps I mentioned earlier that you haven't installed before and activate it as a trial or 2) purchase a subscription for Creative Cloud.  #1 option allows you to use MPEG2 30 more days.  With #2 option, you can use MPEG2 as long as you keep your subscription active.  I hope this helps.

  • Media Encoder CC

    I have the Adobe Creative Cloud on the new Mac Pro. Now I can no start the Media Encoder. Am I the only one who has the problem?
    Can anyone help me?

    Hi Media Encoder CC,
    Welcome to the Forums.
    Please follow the KB Article provided below and check whether it resolves your issue or not.
    http://helpx.adobe.com/creative-cloud/kb/ame-premiere-crash-launch-export.html
    Regards,
    Vinay

  • Media encoder cc export issue

    i got a user that have issue export with media encoder
    when she encode she get this error
    any idea
    Thanks

    Any one ?

  • Media Encoder CC won't launch

    I've been succesfully working with media encoder for sometime now but it won't start for some reason. Using Mac OS 10.6.8, icore 7 proc, 16gb RAM, Encoder CC 6.0.2 what's causing this?

    Thanks, It started working after I logged into my Adobe account. Curious if that had anything to do with it. I also tried a few options (similar to this) I found in the forum which didn't help until I restarted. Not sure which one did it but it's all good now. Thanks!
    cid:E05335EC-C91D-4503-A609-511A1CD6F2EE
    Randy Cates | Video/Motion Graphics
    800.440.1088
    14287 N. 87th St. Suite 220
    Scottsdale, AZ 85260
    Fax: (480) 949-2427
    cid:81ED8132-3DE8-4E8D-973C-64CDC5BC8985<http://www.facebook.com/shurwest>  cid:A3749390-E4AB-4976-BE58-B02192E9077F <http://www.twitter.com/shurwest>   www.shurwest.com<http://www.shurwest.com/

  • Media Encoder CC 14 renders with black frame at the end

    Hello,
    my Media Encoder running on Mac Yosemite makes a black frame at the end of h264 clips...
    How can i fix this?
    Thanks

    I just figured out - it might be a quicktime viewer problem...

  • Media Encoder CC  won't render Magic Bullet Denoiser II

    Hello there,
    i've got the following Problem: I am having Premiere CC and used the Red Giant Plug-In Denoiser II on my last project, when i import this project to the Media Encoder and select Quicktime for output, the Media Encoder won't render the clip with this Plug-In. i always get the original files out, without the denoiser. Original footage from in premiere is 2,5k CinemaDNG RAW from the Black Magic Cinema Camera.
    thx

    I feel like there was a recent update to the RG plugins (inside of the last 30 or so days.) Are they up to date?

  • Media Encoder CC // Red Giant Denoiser II

    Hello there,
    i've got the following Problem: I am having Premiere CC and used the Red Giant Plug-In Denoiser II on my last project, when i import this project to the Media Encoder and select Quicktime for output, the Media Encoder won't render the clip with this Plug-In. i always get the original files out, without the denoiser.
    thx

    no windows, footage is cinemaDNG 2,5k RAW from Blackmagic Cinema Camera.

  • Media Encoder CC - Bug or just finicky?

    I'm confused about Media Encoder, and hoping someone can help.
    I have a short film that's primarily 4K ProRes augmented with some "flashbacks" that are 1920 by 1080 h264 files.  All edits beautifully in my 4K ProRes timeline.
    I have some Magic Bullet B&W corrections on the 1080 footage.  On the 4K footage, I just have an overall grade in an Adjustment Layer (for now).  I can play in Software Mode (CUDA won't work on my Retina Mac - separate thread!) at 1/4 resolution.  The 4K stuff looks great, the 1080 pretty bad.
    I've been outputting by matching sequence settings.  The file is TITANIC, but looks great.  I use that file to make various smaller files in APPLE COMPRESSOR.  I find it better and more flexible (especially with cropping for 2.35, etc.)  What can I say.  All in all, the workflow works for me.
    So here's the problem.  Today I wanted to use In and Out to export a small section for music review with a colleague.  No need to have a huge file, I just used Media Encoder in a Vimeo SD mode. 
    In the first attempt, the 1080 stuff oddly looked terrible.  Just as it does when viewed at 1/4 resolution.  To make sure everything was okay, I outputted that section at Matched Sequence settings.  All good - the 1080 stuff had the Magic Bullet B&W look working great.
    Then I tried again with the Vimeo SD setting.  Only this time I checked Render at Maximum Resolution.  Took FOREVER, but all good again.  The 1080 stuff was fine.
    Next I renendered "in to out" in my sequence (I hadn't done so previously - I was working "red line").  Output without checking Max Render Quality.  Back to the horrible 1080 stuff.
    Finally, I chose "use previews", but not max render.  All good again.
    So, at last a question.  Does this make sense?  I never before had to use either Maximum Render OR Use Previews to get acceptable quality with "device" settings.  Is this a bug?  Or related to my disparate picture sizes?  Or something else?  Thank you all!

    [Moved to AME forum.]
    I can see where this would be expected behavior.

  • Media Encoder CC Encoding Failure

    I have never had any problems with Media Encoder on my system, but since ugrading from CS6 to CC suddenly the Media Encoder fails whenever I use the QUEUE rather than EXPORT on the Export Settings screen in Adobe Premiere Pro CC. 
    When I click the Failure link for more information, it just pulls up the log which tells me that Encoding Failed.  Has anyone else experienced this?  Any ideas for how to resolve it?
    It's not a huge problem because I can always encode each video one at a time by clicking export, but being able to batch process a bunch of videos at a time helps the workflow.  THANKS!

    Yes, AME queue is a problem.  I have a 28 minute weekly broadcast for a client that must be encoded in 6 different formats for TV Broadcast, mpeg2 DVD, vimeo, mp3, h.264 for vimeo, etc.  If I attempt to encode all 6 in the queue I will have some success and also failure.   If I queue several videos that all require mpeg2 (though with each requiring several different specs, i.e., upper field vs. lower field, mpeg2 dvd, mpeg2 HD, etc.) it will complete the task.  Yet if I add h.264 to the mix all encodes will fail.  I can encode h.264 by itself with no problems.  So yes, you are not alone.  Not sure what the solution is.  In CS6 one could queue all of these formats and walk away.  Can Adobe acknowledge these issues and then propose a solution?

  • Media Encoder CC conflicting with Premiere Pro CC

    Why does Adobe Media Encoder pause while exporting a video when I try to edit another video in Premiere Pro?
    On the older version I was using before I upgraded, they would both run simultaneously.
    Also, is there a phone number that I can call to get direct support from Adobe?
    Computer Specs:
    Mac OS X ver 10.9.5
    2.7 GHz Intel Core i5
    16 GB 1600 MHz DDR3
    Intel Iris Pro 1536 MB
    Software:
    Adobe Premiere Pro CC
    Ver 7.2.2 (33)

    Ask in the Premiere forum.
    Mylenium

  • Media Encoder CC audio question

    I have a ProRes standard def file (.mov) with 2 stereo pairs of audio.  I am trying to export it to a DVCPROHD Quicktime (.mov) with the same audio configuration. 
    This seems to be impossible.  My audio export options as a Quicktime file with this codec are 1 mono track, 1 stereo pair or 2 mono channels.  This would result in a downmix, which I do not want. 
    There is a setting which allows me to have this video codec and the audio configuration I want, but the resulting file will be in a .mxf wrapper, which I cannot use.
    Is there really no way to just do audio passthrough in Media Encoder?

    I am running version 8.2.0.54 currently.
    So... I start Media Encoder, add a file with 1 video track and 8 discrete channels of audio to the queue, select "QuickTime" for my export, select "custom" from the dropdown under "export settings", select the "audio" tab and go to the "basic audio settings" where I can select the number of audio channels I need under the "channels" pull-down menu.
    Yes, this seems to work fine!  I wonder why I couldn't get this to work yesterday (or ever, really), despite doing what I thought was exactly that.
    Thanks for the help!

Maybe you are looking for