Dynamic BULK SELECT/MODIFY

Hi,
When using EXECUTE IMMEDIATE with a dynamically
built SELECT/INSERT statement with varying
tablename, fieldnames, fieldtypes and fieldcounts
how do I make the BULK COLLECT INTO/USING parts
dynamic too?
Can I use RECTYPE arrays if the type depends on
the dynamic statement? Kind of like (pseudo-code)
procedure FETCH(p_Stmt VARCHAR2)
valueType TABLE OF p_Stmt%REC_TYPE INDEXED BY
BINARY_INTEGER;
values valueType;
LOOP
EXECUTE IMMEDIATE p_Stmt
BULK COLLECT INTO values LIMIT 1000;
FOR values LOOP
-- use values.a and values.b
END LOOP
END LOOP;
FETCH('SELECT a,b FROM t');
If I'm forced to use DBMS_SQL and bind OUT/IN arrays
of different types do I need to pre-allocate arrays
of each type against the chance that up to (say)
a 100 DATE columns end up in need of beeing bound?
Or can I reuse one array per type because the methods
copy the arrays? Or is there a generic type that can
be used to bind whatever type the column has?
regards,
Schenke

Hi Justin,
So I gathered (my question mentioned this option).
I only had gotten the impression from some comments
that DBMS_SQL may be slower than EXECUTE IMMEDIATE
because of the extra layer of flexibility. Maybe
there will be more parsing too.
There seems to be no way to define the arrays needed
for the DBMS_SQL-IN/OUT-binds dynamically. I don't
think reusing the same array for different columns
will work either. That means arrays must be defined
against all possible columns or at least enough of
each type with a dynamic allocation process (i.e.
count the number of columns for each type and assign
arrays with names like date1, date2, date3, ... to
the 1., 2., 3... DATE column in the statement.)
regards,
Schenke

Similar Messages

  • Dynamic bandwidth selection for PPPoE over Ethernet/VLAN

    Hello all, hope you are doing great.
    I'm planning to deploy PPPoE Server (Cisco Router 7609) for a ISP. This ISP will provide Internet connection for customer over Ethernet.
    I have to provide a solution to assign bandwidth to each customer by RADIUS and I find some clues that Dynamic Bandwidth Selection (DBS) should be the answer. Unfortunately, DBS only support PPPoA or PPPoE over ATM.
    If you have any experience with equivalent function, please help me. Thank you very much.
    Regards,
    Hiep Nguyen.

    Hiep,
    I think I have figured this out.  Here is the test config on my PPPoE server:
    int lo1
      ip address 172.25.25.25 255.255.255.255
    ip radius source-interface Loopback1
    aaa new-model
    radius-server host 172.16.1.55 auth-port 1812 acct-port 1813 key cisco$$$
    aaa group server radius RADIUS-ACT
     server 172.16.1.55 auth-port 1812 acct-port 1813  
    aaa authentication login default group RADIUS-ACT local
    aaa authorization exec default group RADIUS-ACT local
    aaa accounting exec default start-stop group RADIUS-ACT
    aaa accounting delay-start
    aaa authentication ppp default if-needed group RADIUS-ACT local
    aaa authorization network default group RADIUS-ACT local
    aaa accounting network default start-stop group RADIUS-ACT
    aaa accounting update periodic 5
    bba-group pppoe global
     virtual-template 1
    interface fa0/1
     pppoe enable group global
     ip address 172.30.0.1 255.255.0.0
     no shut
    interface Virtual-Template1
     mtu 1492
     ip unnumbered FastEthernet0/1
     peer default ip address pool GLOBALPOOL
     ppp authentication chap
    ip local pool GLOBALPOOL 172.30.0.2 172.30.127.255
    policy-map POLICE-128K
     class class-default
        police 128000
    policy-map POLICE-512K
     class class-default
        police 512000
    Here are the attributes on the radius server, for a group the PPPoE customer belonged to:
    Service-Type = Framed
    Framed-Protocol = PPP
    cisco-avpair="ip:sub-policy-In=POLICE-128K"
    cisco-avpair+="ip:sub-policy-Out=POLICE-512K"
    Here is the show policy-map on the virtual-access interface the client connected on:
    sho policy-map int virtual-a 3
     Virtual-Access3
      Service-policy input: POLICE-128K
        Class-map: class-default (match-any)
          1000 packets, 1402000 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: any
          police:
              cir 128000 bps, bc 4000 bytes
            conformed 799 packets, 1120198 bytes; actions:
              transmit
            exceeded 201 packets, 281802 bytes; actions:
              drop
            conformed 0 bps, exceed 0 bps
      Service-policy output: POLICE-512K
        Class-map: class-default (match-any)
          911 packets, 1137746 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: any
          police:
              cir 512000 bps, bc 16000 bytes
            conformed 799 packets, 1136178 bytes; actions:
              transmit
            exceeded 0 packets, 0 bytes; actions:
              drop
            conformed 0 bps, exceed 0 bps
    I was able to generate enough traffic with ping to meet the exceed action in and have it drop packets.

  • Dynamic Date selection inactive

    Hi,
    I am not able to give dynamic date selection in a variant. (D: Dynamic date calculation).The traffic light is displayed in red and there is no options such as
    current date etc. is there any need to do some settings to get these options.

    Hi,
    have a look at the below link..  ( they have mentioned the steps of customer exit variable fassigning for reporting agent)
    https://websmp110.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700003598422003E
    Regards,
    Siva.

  • Dynamic parameter selection from infoview not storing the sql password

    We are having the problem of dynamic parameter selection from infoview not storing the sql password as it does for the actual report. We are using Crystal Reports XI Release 2 version 11.5.3.438 (Not sure of SP level, asked in separate thread).
    To be more specific.
    We have created a report that dynamically populates the parameters of the report by pulling the records from the Informix sql database and allowing selection from there.
    In the Central Management Console for the report object we have set as follows:
    Process - Database:
    Use original database logon information from the report - the sql username and pw etc
    Use same database logon as when report is run
    Process - Parameters
    In selecting a default selection there is the option to put in the sql password, however, this does not stick and clears after update.
    As such the end result is that every time this report is run from infoview and a user chooses a parameter (there are 5), crystal goes through some timeout for about a minute or so and then requests the sql password, if a user then selects the next parameter, the same timeout and password dialog appears.
    We need the crystal report to handle to the sql password for fetching the parameters as well as for the database section of running the report, however, the parameters insists on the end user always putting the password in.
    This is 100% replicatable on our system.
    Any way that we can fix this?
    Will an update fix this issue? If so could you please advise which one?
    Thanks

    Hi,
    I am having the exact same problem. Any help?
    And what does "Use same database logon as when report is run" mean? For me that would be that no prompt is needed for getting values in a dynamic parameter...
    Regards
    Magnus

  • Dynamic RadioList selection

    I am building a radio list dynamically in TOOL code based upon certain
    criteria. I can get the list built no problem. But, I want to "select" a
    certain element based on an attribute I check on the object. So the element
    I want to appear selected may be element 2 or element 5 or element x. Has
    anyone ever done this? I can't seem to find anything in the Forte help that
    will allow me to do this?? Any help would be greatly appreciated.
    Thanks!!
    Doug Scurr
    HealthPartners
    8100 34th Avenue South
    Minneapolis, MN 55440-1309
    (612)883-7317
    [email protected] <[email protected]>

    Dale,
    I knew it would be something easy!! I obviously can't read very well!!
    Thanks for the help!!
    Doug Scurr
    HealthPartners
    8100 34th Avenue South
    Minneapolis, MN 55440-1309
    (612)883-7317
    [email protected] <[email protected]>
    -----Original Message-----
    From: Dale V. Georg [SMTP:[email protected]]
    Sent: Tuesday, April 27, 1999 2:34 PM
    To: [email protected]
    Cc: [email protected]
    Subject: Re: Dynamic RadioList selection
    > [email protected] wrote:
    >
    > I am building a radio list dynamically in TOOL code based upon
    certain
    > criteria. I can get the list built no problem. But, I want to
    "select" a
    > certain element based on an attribute I check on the object. So
    the element
    > I want to appear selected may be element 2 or element 5 or element
    x. Has
    > anyone ever done this? I can't seem to find anything in the Forte
    help that
    > will allow me to do this?? Any help would be greatly appreciated.
    > Thanks!!
    This should be as simple as setting the IndexValue of the radio list
    to
    the item that you want to have selected. For example:
    self.<theRadioList>.IndexValue = 2;
    to select the second item. Make sure your window is already open
    when
    you do this, though. ie, make sure self.Open() has already been
    called. The Open() method initializes a lot of the widget
    information
    on the window, and it may well set the index value of the radio list
    back to 1.
    Hope this helps,
    Dale
    ===================================
    Dale V. Georg
    Senior Systems Analyst
    Indus Consultancy Services
    [email protected]
    ===================================
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • BULK SELECT EXECUTE IMMEDIATE

    I want to update 3 lakhs record in EXP__REQUEST_SK table
    How to use bulk select "execute immedaite" in PLSQL
    Update EXP__Request_sk set R_CUSTOMERNAME = cust_name where BFG_CUSTOMERID=cust_id;

    Note: this code is not tested.
    create or replace procedure generic_update (
      tab_name  varchar2,             -- table to update
      field_to_update  varchar2,     -- column to update
      field_value  varchar2,             -- new column value
      id_field_name  varchar2,        -- id column name
      id_value number)                 -- id value to identify the record
    as
      --local variables section
      stmt varchar2(4000) := '';
    begin
      stmt := 'update ' || tab_name || ' set ' || field_to_update || ' = :f_value where '
                 || id_field_name || ' = :i_value';
      savepoint txn1;
      execute immediate stmt using field_value, id_value;
      execute immediate ('commit');
      dbms_output.put_line('Update is done.');
    exception
       when others then
          rollback to txn1;
          dbms_output.put_line('Update has been rolled back.');
    end;
    /Even though I provided this, static SQL is always faster than PL/SQL because there is no context switch.
    An alternative to the above is to write all static SQLs into a script and run it.
    However, if you don't know which tables and column to update before hand, and the update depends on user inputs (e.g. from a JSP), then Java can call a stored procedure to perform the update.
    Edited by: pl/sql novice on Nov 20, 2008 11:24 PM

  • How-to Dynamic Hierarchy Selection.

    Hi guys,
    does anyone know how to implement "Dynamic Hierarchy Selection"? I have a main hierarchy but would like to filter it further while loading the hierarchy.
    E.g. I have a financial statement verison with both Balance Sheet and P/L items, i would like to separate the main into two new hierarchies, one BS and P/L hierarchies instead, apparently the infopackage allows you to write small codes to dynamically select which hierarhcy you want.
    Cheers.

    Hi,
    We donot have this type selection at the time of upload. The thing we can do is upload both versions into BIW and in the report we can use Hierarchy variable to have dynamic selection of hierarchy.
    with rgds,
    Anil Kumar Sharma .P

  • BMBC Dynamic Date selection Variant

    Hello Team,
    I want to create variant in BMBC -Batch Information Cockpit with Dynamic Date Selection. But it do not find the screen the to set-up variant attributes
    This is the field where I want to have dynamic date selection, 1st Day of the month to Last day of the month.
    Field name and program
    I am using SE80
    As you can see screen number 0100 is not showing up. and I have gone though all available screen but i could not find the field.
    Please advise if dynamic date selection for this field is possible at all or there is other way.
    Thanks

    I don't think that it is possible to have dynamic date selection here. The whole selection screen is just dynamic, it has only place holders and you define in customizing which field is on the selection screen.
    You actually save a selection variant via this extra big button for selection variants, which is quite different to the disc icon where you usually save your selection variants and where  you have the option to define dynamic date fields.

  • Sample routine for dynamic flatfile selection in infopackage?

    hello guys,
    I tried to find one sample routine for Dynamic Flatfile selection at Infopackage level in forums,internet...but couldnot find it....(something like....we give one flatfile everyday...process chain runs everday...and whenever Infopackage executes...it selects that days flatfile basing on date or something and loads the data)....
    can anyone give that sample routine ?
    Thanks,
    Rgards,
    S

    Hi,
    You can select the dynamic flat file using routine at info package.
    The routine here is to create dynamic file name, click the routine button beside the name of flat file.
    create name and write the related code.
    Eg: concatenate 'D:\BIFLATFILES\PRODUCTDATA_'   SY-DATUM  '.CSV'  INTO P_FILENAME.
    In this path you have to paste your file with name PRODUCTDATA_09.10.2009.CSV.
    So if it is daily load we need change the file name with that date.Infopackage automatically picks up this file and loads the data.
    Based on your requirement you need to change the code to select file with path.
    Thanks,
    Joseph

  • In CC, why can I no longer use Select/Modify/Contract after Selecting all?

    I've been using CS3 and am now on CC.
    I tried using the Border option then Inverse, but this is a poor substitute.
    Any solutions or alternative suggestions?
    Many thanks.

    This issue is solved with today's (10/6/14) release of Photoshop CC 2014 contains a "Apply Effect at Canvas Bounds" option for the follow features:
    Select > Modify > Smooth...
    Select > Modify > Expand...
    Select > Modify > Contract...
    Select > Modify > Feather...
    Users now have the option to have these commands apply to an entire selection or just the portion of the selection that is not touching the canvas bounds with the "Apply effect at canvas bounds" checkbox.
    The checkbox option is remembered for each, individual selection modification option. The checkbox default is "off" on first launch and with preferences deleted.
    With the "Apply effect at canvas bounds" checkbox ON, the behavior is equivalent to Photoshop CS3 behavior.
    Thank you for your feedback!
    Meredith

  • Dynamic row selection based on Page member selection in Planning web-form

    Hello experts
    I have requirement where, user dont want 10 webforms to enter 2 accounts line for various sparse members. Below is the dimension detail and web-form current design
    Account - Dense
    Period - Dense
    Year - Sparse
    Scenario - Sparse
    Version - Sparse
    Entity - Sparse
    Product - Sparse (600 level 0 members)
    Product dim has family1 as parent and 40 level 0 mem like that there are 10 family level 1 members, now to enter account member (only 2 member) for 6 years projection ( it means 12 periods and 6 years in column ) , i can build 10 web-forms with one web-form has one family level-0 mem in rows,
    however my question, is how can i achieve this in one web-form, instead of 10 web-forms for 400 products ?
    your help is greatly appreciated.
    Edited by: 859874 on Jul 18, 2012 8:58 PM

    Im not sure there is any simple way to get dynamic row selection based on what is selected in the page.
    If I were designing the form based on what you have stated, I would probably stick both Account and Year in the page, and the 400 products in rows. This would require the user to select the different combinations of Year / Account, but would mean only 12 columns (instead of 72).
    Alternatively you could stick Account in rows too - meaning 800 rows, but less combinations to select in Page....all depends what is deemed acceptable to the user.
    Probably other approaches that may be better than above (put Product in the Page for fun!!)
    Thanks
    JB

  • Linksys WRT-1900AC and Dynamic Frequency Selection(DFS)

    Hello All
    Does anybody know if the Linksys Router WRT-1900AC will support Dynamic Frequency Selection(DFS) by a newer Firmwareupdate?
    I don't understand why this feature has not been added yet
    Second why does i have to set the 5GHZ WLAN to mixed to use AC. for me it is better when there is a Mode AC only.
    thanks for your help

    http://en.wikipedia.org/wiki/Channel_allocation_schemes
    Your best bet would be to phone contact your regional Linksys support office and ask them about this. Ask them if this model doesn't support it, which one does, if any. Let us know how it goes please.

  • Select Modify Expand is rounding my corners out of nowhere.

    I was working on something the other day that may or may not have something to do with this where I was going to Select>Modify>Feather.
    Whenever I try to make any type of selection, be it Ctrl+clicking the thumbnail, rectangular marquee tool, or pen tool, It has rounded edges for no reason. I have no feathering on, I have no anti-aliasing on. I tried going to Select>Modify>Feather and changing it to 0 but, it won't let me go below 0.1 and even still, that shouldn't be affecting my selections unless I choose it for each individual selection right? It's just frivolously rounding my edges. I tried deleting my preferences file and that didn't help either. I'm on Photoshop CC btw. The corners seem to be fine until I Select>Modify>Expand. I can't tell if the feather's just so low that you can't tell before the expand or if it's the expand causing the edges to round off. I have been using this method for months now and Expand has never rounded my edges until today.

    I know that there's alternatives but, what I want to know is why I have never gotten rounded corners from expand until today when everyone is telling me that getting rounded corners from expand is actually how it's supposed to work. I know for sure that all the feathering options are at 0 but, it's not feathering, it's just rounding and, I know for sure that I was using Select>Modify>Expand to increase the size of specific shapes, most recently for layer masks. I can't think of anything I could have hit that would have caused it to just change out of the blue like this.

  • Select Modify Contract Grayed Out

    Mac OSX 10.7
    PS CS5
    Okay, I know this has been posted before and I've read 4 or 5 threads with no resolve for me. The problem is that after using my select all, or using the marquee tool (tried both ways) to draw the selection my contract option is still grayed out it (like most everyone else has said). Only difference is, it was WORKING fine 30 min ago, I've used it many times while working on numerous documents and now all of the sudden it wont work on anything. I havn't made any changes to any prefs, but maybe I hit a hotkey and locked something? I remember when my define pattern was grayed out, I read a post where I clicked one simple option and voila it was back to normal...something with a spacebar shortcut I think? Too long ago to remember, anyways I was hoping there might be an option for this. I know the work arounds and use them from time to time, but I really would like for shortcut to be normal again
    Michael

    In CS5, if you chose Select > Select All or had the selection touching the border, the Select > Modify Commands were unavailable.
    This issue is solved with today's (10/6/14) release of Photoshop CC 2014 contains a "Apply Effect at Canvas Bounds" option for the follow features:
    Select > Modify > Smooth...
    Select > Modify > Expand...
    Select > Modify > Contract...
    Select > Modify > Feather...
    Users now have the option to have these commands apply to an entire selection or just the portion of the selection that is not touching the canvas bounds with the "Apply effect at canvas bounds" checkbox.
    The checkbox option is remembered for each, individual selection modification option. The checkbox default is "off" on first launch and with preferences deleted.
    With the "Apply effect at canvas bounds" checkbox ON, the behavior is equivalent to Photoshop CS3 behavior.
    Thank you for your feedback!
    Meredith

  • Select Modify Border always feathers

    Hi All,
    Apologies if this has already been discussed somewhere previously, but I'm getting very frustrated that I can't seem to easily accomplish what should be a very simple task:
    I am using CTRL+A to "Select All" and then trying to contract the selection by X pixels. Apparently my only option after a Select All command is to use the "Border" command, but this always seems to feather the selection, no matter what I do. I know there are some "workarounds" to get the selection I want, but seriously, this is so dead simple of a task I'm going bonkers here.
    Is it just me or did this used to be a lot easier in earlier versions of PS? Seems to me that in CS5 Adobe is trying to get "fancy" with their UI and making things a lot harder than they need to be.
    Could someone from Adobe let me/us know why the UI is making it impossible for me to do a simple Select > Modify > Contract command (following a Select All)? I distinctly remember being able to do this without hassle in every other version of PS I've ever worked with.
    Your in Frustration,
    Funkmasta

    Howdy.
    Is it just me or did this used to be a lot easier in earlier versions of PS?
    It's not just you. It's pretty easy in CS3.
    The screenshot is after Ctrl+A has been applied. The Contract command is still active. And the selection will not be feathered.
    According to MTSTUNER's link (thank you), CS3 is the only version that will do this. Sometimes it's good to be behind the curve.
    Maybe the referenced script will fix you up. I don't know anything about scripts, but I do know a little about actions. So out of curiousity, I hacked together an action which should work in CS5. It's based on expanding the canvas, contracting the selection, then cropping back to the original size. It looks like a long way to go to accomplish something so simple, but Ps does it all in the blink of an eye.
    1. Merge Visible (Ctl+Alt+Shft).  This creates a proxy for the original image size after the canvas is enlarged. This layer will be deleted at the end of the action.
    2. Canvas Size. I set it to 105% in both axis. The percentage doesn't matter, as long as it's more than 100. The point it to get the canvas border away from the proxy border.
    3. Set Selection. Ctl +Click on the thumbnail on the proxy layer. This will select the perimeter of the proxy layer, which is the same as the original canvas.
    4. Contract. Menu>Select>Modify>Contract. Enter the number of pixels. This can be changed later. As you can see in the screen shot above, I have made this a conditional action. It will stop here for you to approve or change the settings. When you hit enter, the action continues.
    5. Layer Via Copy. This layer preserves the contracted selection. It's really being used as a channel. This layer will also be deleted at the end of the action.
    6. Set Selection. Ctl+Click on the thumbnail for the Merge Visible layer from step 1.
    7. Crop. Menu>Image>Crop. The image is now the original size.
    8. Set Selection. Ctl+Click on the layer thumbnail created in step 5. You should now be looking at the contracted selection. We're done, except for a little housecleaning below.
    9. Delete. Delete the top layer, which should be the contracted channel. (This doesn't affect the selection.)
    10. Delete. Delete the top layer, which should be the Stamp Visible layer. Now we're back where we started, but we have a contracted selection.
    Stop Recording.
    It may look ridiculous on paper, but it works like a charm, so far as I've tested it. And the beauty of actions is you only have to make them once. No matter how much trouble they are.
    Once the action is made, it's quick and easy to use. Just click on the action button.
    The contract pixel dialog box appears.
    OK or change and OK, and you're done. The selection appears at the desired location, and is not feathered. In practice, the only downside is you get a few extra history states.
    You get where you're going, and you get there quick. So quick no one will notice you got there via Paris, London, and El Paso.
    I'm not 100% sure this will work in CS5, as I've never laid eyes on it, but the issue seems to be that when the selection touches the canvas border, Contract Selection is not available. Nowhere in the action does a selection touch the canvas border, so it should work the same as it does in my CS3. If you're interested in testing it, I can send you the Droplet, or you can create it from scratch using the instructions above.
    Anyway, that's all I got, and it could all be wrong.
    Peace,
    Lee

Maybe you are looking for

  • [SOLVED] CUPS fails to find my USB-connected Lexmark X543dn

    Hi there! I just installed arch off the netinstall CD. Right now I'm struggling to get it recognize my printer. I fired up rekonq at localhost:631 and clicked my way to Add Printer. When prompted, I provided root's name and password. This brings me t

  • My iPhone 4 stuck in the "connect to iTunes" screen after trying to update to iOS 7

    Hey guys. So i have a pretty big problem here. Today after a little bit of work I updated my iPhone 4 to the new iOS 7. I went to bathroom at some point, while my phone was updating, and when i returned the screen of iPhone showed the "connect to iTu

  • Save custom drum settings for Drummer track?

    Hi guys.  Wondering if there is a way to save the Drummer region settings from one project and use them in another project without manually setting things like complex, loud, fills, etc.  THanks.

  • Access - Cannot edit tables, source database missing

    Hello, I am working on modifying some tables in a database, when I try to edit a table it tells me along the lines of, "this table is a linked table it cannot be modified, if you want to modify this table you must do so from the source database." Oka

  • Archive PDF

    Hi, can you help me please??? I have to print a very important document with a pdf format (Adobe Acrobat data format) but, in Sap 5.0 I can´t choose this type of format, why??? Is this correct?? Wich device types exist for creating the pdf archive in