I need some working examples with pl/sql records and pl/sql tables.

i am new to pl/sql tables and pl/sql records. i need some working examples on pl/sql records and pl/sql tables from basics to hoghlevel.how to use then procedures and functions and packages.

i am new to pl/sql tables and pl/sql records. i need some working examples on pl/sql records and pl/sql tables from basics to hoghlevelThere is no such thing as PL/SQL "+tables+". This is a misnomer and creates the perception that a PL/SQL "table" is somewhat like a SQL table. Nothing can be further from the truth. The correct term is "+collection+" or "+associative array+". Compared to SQL tables, these are very primitive structures, very rigid structures, cannot scale, and can be quite expensive memory wise.
That is not to say do not use an associative array or collection. These are very useful tools.. but only when applied correctly. Like using a collection for a bulk fetch to transfer more rows between the PL and SQL engines and thus decrease context switching.
Unfortunately, quite often we see the row-by-row and slow-by-slow approach - where the developer uses SQL as an I/O only layer, pulls rows into expensive PL engine memory into record structures and arrays, and then process the rows there.
So before looking at working example (even the wrong approach's code will compile and run and work in practice), make sure that you know the fundamentals of correctly using the PL engine and correctly using the SQL engine. And these fundamentals can be summed up into a very basic rule:
Maximize SQL. Minimize PL/SQL+
Get this rule right, and you will have a sound foundation for writing performant and scalable Oracle applications.

Similar Messages

  • I have changed my Apple ID name and I want to change it on iCloud, however I am not able to delete the previous account because I need to turn off the Find my iPhone - and for that I need to log in with the old name and that is not working. Help anyone?

    I have changed my Apple ID name and I want to change it on iCloud, however I am not able to delete the previous account because I need to turn off the Find my iPhone - and for that I need to log in with the old name and that is not working. Help anyone?

    Hey tulgan,
    This link will provide information on what to do after you change your Apple ID:
    Apple ID: What to do after you change your Apple ID
    http://support.apple.com/kb/HT5796
    Welcome to Apple Support Communities!
    Take care,
    Delgadoh

  • Query Engine report error with Crystal Report 9 And MS SQL SErver 2000

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...
    Refer the above statement highlighted in BOLD. That statement is WRONG. Select what ???? Try any one of the below statement,
    select ''
    --or
    select 0
    --or
    select null
    Regards, RSingh

  • The gyroscope of my IPAD2  stopped working either with Real Racing 2HD and SAFARI, how do I proceed?

    The gyroscope of my Ipad 2 suddenly stopped working ( either with Real Racing 2HD and Safari ). How do I proceed to fix it.
    Thanks

    If you want to sync content that is on your iPod Classic to your iPad, it needs to be in your iTunes library first, if it isn't already.  From there, you can configure your iPad to sync all this content from under the appropriate tabs.
    If you need help on how to copy content from the iPod Classic back to your PC, see this older post from another forum member Zevoneer covering the different methods and software available to assist you with this task.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • My Classic IPod had been working perfectly with Windows Vista OS and on a dock. I left it unattended for 10 days, recharged it and tried to play music on the dock. All that shows on the screen is the Apple Logo and I am unable to restart or update the IPo

    My Classic IPod had been working perfectly with Windows Vista OS and on a dock. I left it unattended for 10 days, recharged it and tried to play music on the dock. All that shows on the screen is the Apple Logo and I am unable to restart or update the IPod. Any ideas???

    The warranty entitles you to complimentary phone support for the first 90 days of ownership.

  • I live in venezuela but i need pay a bill with american credit card and my venezuela store dont let me pay please help

    i live in venezuela but i need pay a bill with american credit card and my venezuela store dont let me pay please help

    If you still have problem, contact iTune Support
    https://ssl.apple.com/emea/support/itunes/contact.html

  • I have an Iphone 4 and it keeps kicking in the 3G instead of using my wifi. My wifi works well with all other devices and the password is fine. I connect and it show the connection then goes back to 3G.   Thank you

    I have an Iphone 4 and it keeps kicking in the 3G instead of using my wifi. My wifi works well with all other devices and the password is fine. I connect and it show the connection then goes back to 3G.   Thank you

    This crap just happened to me this morning where I was sent 90% data plan threshold warningfrom AT&T (while sleeping at 7:09am) then 5 minutes later getting the Overage data plan warning from AT&T.  This is all while I'm asleep right next to my phone plugged into a (non-Apple) dock on my clock radio.
    Android has a limiting feature, why can't the "smart" guys at Apple learn from this??

  • Comparing Two tables with 300k records and update one table

    Could you let me know how to compare two tables having 300k records and update one table.below is the scenario.
    Table Tabl_1 has columns A,B and Tabl_2 has columns B,new_column.
    Column B has same data in both the tables.
    I need to update Tabl_2 in new_column with Tabl_1 A column data by comparing B column in both tables.
    I m trying to do using PLSQL Tables.
    Any suggestion?
    Thanks.

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    If you're asking about a DML statement, such as UPDATE, the CREATE TABLE and INSERT statements should re-create the tables as they are before the DML, and the results  will be the contents of the changed table(s) when everything is finished.
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002
    ef2019c7-080c-4475-9cf4-2cf1b1057a41 wrote:
    Could you let me know how to compare two tables having 300k records and update one table.below is the scenario.
    Table Tabl_1 has columns A,B and Tabl_2 has columns B,new_column.
    Column B has same data in both the tables.
    I need to update Tabl_2 in new_column with Tabl_1 A column data by comparing B column in both tables.
    I m trying to do using PLSQL Tables.
    Any suggestion?
    Thanks.
    Why are you trying to use PL/SQL tables?  If tabl_1 and tabl_2 are regular database tables, it will be much simpler and faster just to use them.
    Depending on your requirements, you can do an UPDATE or MERGE, either in SQL or in PL/SQL.

  • SQL, PL/SQL Expression and PL/SQL function

    In a Post Calculation Computation field I wanted the following computation:
    if B is X
    then
    field = A
    else
    field = B
    end if;
    or as a decode
    Decode(B,X,A,B)
    I could not get this to work so I wrote a database function that simulates the decode. So when I put:
    My_decode(B,X,A,B)
    in the field it did work.
    Basically I am not sure what kind of code one is expected to put into SQL, PL/SQL Expression and PL/SQL function fields. Can someone give an example of each? Also the APEX help is sometimes incorrect.
    For example if you click the "Post Calculation Computation" label it says:
    The For example, if this item is named P1_X, you could use post calculation expressions such as UPPER(:P1_X), INITCAP(:P2_Y), MIN(:P1_X,:P2_Y-200), NVL(:P1_X,:P2_Y), or a function call such as return my_func(:P1_X); to set the final value of the item.
    But if you put return my_func(:P1_X); in the field you get an error. It should be just my_func(:P1_X);
    thanks Rene

    DECODE is only available in SQL, so would have to be used in a SQL Expression.Yes, that's what APEX keeps telling me when I use in in a field that has "SQL or PL/SQL expression" above it. So what do you put in the field?

  • Differ java.sql.* and javax.sql.*

    Dear Friends,
    What is differenece between java.sql.* and javax.sql.*?.
    Advance in thanks

    java.sql is the package you can use for all basic kinds of database access. If you are not developing a full scale enterprise application, java.sql package is all that you need.
    javax.sql is extension to the basic java.sql package. It includes classes that allow connection pooling and rowsets, among others.
    If you are just getting started with JDBC, you just need to get familiar with java.sql and leave the wonders of javax.sql until later.

  • I need some simple examples to start with for Oracle ESB

    Hi All,
    Please share some simple examples to startwith for Oracle ESB.
    I need to understand, what are the files are created, once created an ESB project.
    What is the use of the files how to edit them with out using JDeveloper.
    Iam trying to create a simple example.
    I would like to create a file which has only "HELLO" in that file, simple text file inside a folder "INPUT" in my c:\ drive.
    I wanted to create a ESB service which picks up the file and add a string to it like "HELLO" + "ESB" and drop this file into "OUTPUT" folder in c:\ drive.
    How do i do that. I tried to do it when i deploy the integration server connection is gettting hit badly. I dont see that connection any more and i dont see that connection in my JDeveloper.
    I dont want to start with existing code.
    Please help
    Regards,
    Vijay.B
    Message was edited by:
    Vijay.B
    Message was edited by:
    Vijay.B

    Hi,
    If you want to do it from scratch you can basically do the following:
    Make sure you have created an application server and integration server connection in JDeveloper.
    1) Create a new JDeveloper project of type ESB project.
    2) Possibly add a ESB System/Group (open the esb file and click "Create System/Group") to group ESB projects.
    3) Create an XML schema describing your input XML file. Probably one element of type xsd:string.
    4) Create an example XML file which is well-formed and valid according to the XSD from step 3.
    5) Create a new File adapter (inbound/read). A routing service is automatically created.
    6) Create a new File adapter (outbound/write).
    7) Create a routing rule in the routing service in which you invoke the write method of the outbound file adapter. Possibly add a transformation using the XSL mapper.
    8) Deploy the ESB project to the server.
    9) Drop your XML file (from step 4) in the directory in which the inbound file adapter is polling.
    10) If it is ok, the file should be picked up, transformed and dropped in the outbound directory. A new ESB instance should be visible in the ESB console.
    See what files are generated on the filesystem in each of the above steps.
    Regards, Ronald

  • Oracle SQL Developer needs some work

    I just downloaded a copy today (1557) for Oracle 9.2i / Windows XP Pro
    Oracle SQL Developer has a few glitches...
    A compiled and working package (compiled in SQL*Plus and TOAD) opens and shows 2 errors in a SQL Query involving a CASE statement. Invalid CASE clause on an ELSE and unexpected token on an alias at the end of the case.
    Compiling a package should display a message saying successfully compiled and the state of a package should always be on display!
    Opened an SQL script but could not execute it as the icon's didn't become active.
    Couldn't then run the script.
    These basic problems would put any serious developer off using Oracle SQL Developer.
    Also background color scheme should be gray and NOT white. White is hard on the eyes. This is just basic UI stuff.
    Oracle, you need more senoir developers!

    Justified to the top left of the sql window, you see the execute buttons. On the top right, you will see a drop down list box. After opening a file, this drop down list box is not selected. Select your connection and the execute buttons on the top left will enable.
    For PL/SQL use a slash / at the end for it to execute.

  • Lightroom 4b - basic tone controls are not intuitive, and need some work (in my opinion).

    I've come up with a variety of settings that I consider optimal in PV2012 that turn out to be totally counter intuitive.
    I don't think this is a good thing.
    One should be able to:
    - up the exposure when it's underexposed, and down the exposure when it's over-exposed.
    - adjust shadows and highlights (and midtone balance) to taste...
    - fine tune darkest tones by adjusting blacks slider (maybe have a separate control for adjusting black clipping point from the control that is used for stretching or compressing darkest tones most, or just use tone curve...).
    - fine tune lightest tones by adjusting whites slider (we already have a separate control for adjusting white clipping point: exposure).
    That is not how Lr4b is working for me at all.
    Having to radically increase exposure to brighten the shadows, then set the highlights to an extreme negative value when the net effect ends up being brighter highlights, is indeed *very* counter-intuitive.
    Conversely, I've had cases when I've had to radically reduce exposure on photos that weren't particularly over-exposed, in order to get the balance of mid-tones/shadows/highlights to work out. - very counter-intuitive, and took me a long time to get it right.
    See related thread: http://feedback.photoshop.com/photoshop_family/topics/lightroom_4b_improve_basic_tone_cont rols
    PS - I've also found myself adjusting blacks or whites in order to reach further into the midtones, instead of shadows & highlights - this is just bass freakun' ackwards!...
    Rob

    Hi Bill,
    All input is welcome.
    Whites slider is the exposure slider's second cousin. Like exposure, it affects all tones, but it affects brightest tones more than exposure. It's almost like the right-end equivalent to fill-light in Lr3. If you just want to get overall exposure + shadows and highlights in the ballpark, it can be done very quickly with Lr4b. I however always want to control the exact brightness of each and every tone, from black to white, and do it in such a way that there are no "flat" regions or desaturated regions. That's when things get tricky. For example, what if you have a photo whose tones are in the ball park, but the middle tone is not bright enough. This happens a lot to people who under-expose in the interest of preserving highlights, then need to bring up the brightness of the whole picture, except for the whites, bottom end mostly. In Lr3, you increase fill light, and if it brightens too much somewhere you decrease brightness there. In Lr4b, increasing the shadows won't reach it. You can get at it by increasing the blacks, but then that unanchors the black point (and messes up the darkest tones which weren't anywere near the midtone target). You can't pull it rightward using highlights, because that won't reach either, and anyway will overbrighten highlights. You can pull it leftward using whites, but then your whites may become too bright. So, what do you do? increase exposure. But then that blows out the whole top end. So what do you do? Decrease highlights. But now you've just affected a bunch of other tones which were not near the tones that were the original target of your desired adjustment. It's all very squirrelly and non-intuitive and requires iteration. Note: I've spent several dozens hours experimenting, I'm not an Lr4b newbie by a long shot - granted, I'm also still very much learning.
    I really think Adobe should consider altering the algorithm such that one can use the slider that represents the tones closest to the desired target tone, then adjust the next closest sliders as compensation... - Everything blending as gracefully as possible with the adjacent zone.
    e.g. (not talking about setting white and black point, which should be independent of all this)
    - blacks: adjusts darkest tones most, shadow tones next most, midtones next most, highlight tones next most, and lightest tones least.
    - shadows: adjusts dark tones most, black tones and midtones next most...
    - midtones: adjusts midtones most, dark and light tones next most...
    - highlights: adjusts light tones most, midtones and lightest tones next most...
    - whites: adjusts lightest tones most, light tones next most, midtones next most...
    Kinda like the tone curve, except with the benefits of the magic logic for recombining tones, which is what makes adjusting tone via the tone controls different than using the tone curve in the first place.
    This way, if you want to add fill light into the deepest regions, you increase the blacks most, if that brightens the shadows too much, then adjust the shadows a little, if that affects the midtones too much, then adjust the midtones a tiny bit, and if that affects the highlights a smidge, then adjust the highlights by the tiniest of smidges. Affect on whites by blacks slider is probably negligible.
    In other words, make the implementation match the zones as you see them in the histogram. For example, in the histogram we have:
    - blacks
    - shadows
    - exposure
    - highlights
    - whites
    Except they don't really do what's suggested by that zone graph:
    - black slider adjust midtones and light tones more than shadow slider does.
    - shadow slider hits a midtone wall.
    - exposure affects lighter tones even more than midtones.
    - highlights hits a midtone wall.
    - whites adjusts midtones and dark tones more than highlights slider.
    Is it possible to get exactly what you want with this scheme? - yes.
    Is it tricky as he|| - yes.
    So Bill, if Lr4b is working for you, then more power to ya. I can make it work for me too. But I think the implementation is not very intuitive, requires mutliple iterations which can take a lot of time, and there may be room for improvement - thus this thread.
    Rob

  • Need some help- 4G with no static IP

    Why is 4G your only option?
    What is it that you're trying to do here?

    Gary D Williams wrote:jackteller wrote:i dont see why the camera's are the issue- 4G is my problem- at is the only coverage option.
    Agreed. It's the wrong technology for this sort of of access. Even a DSL line would be better.absolutely but dont have DSL - not an optionRod-IT wrote:jackteller wrote:the vendor does not offer static IP or port forwarding- i have been told it simply will not work on other forums without these.
    If the vendor does not offer static IP or port forwarding how was you ever expecting it to work?As for other forums telling you it won't work - it sounds like your doubting their views.As Rockn said, you need real IP cameras for this to do what you want.what are these "real IP Camera's", and i was hoping there was some solutions - the camera's were cheap and i got them for testing - other forums mention 4G with CCTV...

  • Need some urgent help with Java code...

    Hello
    i am taking a java class..beginner..and i am a dud at programming...
    had a couple of questions ..how do make a program ignore negative
    integer values,make it terminate when zero is entered instead of a number ,how should i calculate maximum minimum of integers..please help me..
    thanks
    damini

    You got some good advice from Java_Jay.
    Here is a snippet I keep handy for console input and output. It doesn't do your home work but gives you a working example of getting numbers from stdin:
    import java.io.*;
    public class DemoKeyboardInput {
         public static void main(String[] args) throws IOException {
              // open keyboard for input (call it 'stdin')
              BufferedReader stdin = new BufferedReader(new InputStreamReader(
                        System.in), 1);
              // get input from the keyboard
              System.out.print("Please enter your name: ");
              String name = stdin.readLine();
              System.out.print("Please enter your age: ");
              String s1 = stdin.readLine();
              System.out.print("Please enter the radius of a circle: ");
              String s2 = stdin.readLine();
              // perform conversions on input strings
              int age = Integer.parseInt(s1); // string to int
              double radius = Double.parseDouble(s2); // string to double
              // operate on data
              age++; // increment age
              double area = Math.PI * radius * radius; // compute circle area
              // output results
              System.out.println("Hello " + name);
              System.out.println("On your next birthday, you will be " + age
                        + " years old");
              System.out.println("Area of circle is " + area);
    }

Maybe you are looking for