Select with out into in plsql

hi all
i want to write a select statment in a procedure with out into statement ..
is it possilbe if yes how can i do this.
if its not possible then if we have to Return a number of rows from procedure then how can i do this..
thanks in advance

User1728 wrote:
actual i want to return a datatable type data from procedureWhat does "datatable type" mean? "Datatable" is not a type in PL/SQL, so I assume that it has some meaning in your client programming language. What Oracle data type are you trying to return?
My guess would be that you are trying to return a REF CURSOR so that you want something like
SQL> create procedure return_rc( p_rc OUT sys_refcursor )
  2  as
  3  begin
  4    open p_rc for select * from emp;
  5  end;
  6  /
Procedure created.
SQL> variable rc ref cursor;
Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
                    VARCHAR2 (n [CHAR|BYTE]) | NCHAR | NCHAR (n) |
                    NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR |
                    BINARY_FLOAT | BINARY_DOUBLE ] ]
SQL> variable rc refcursor;
SQL> exec return_rc( :rc );
PL/SQL procedure successfully completed.
SQL> print rc
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
    DEPTNO
      7369 SMITH      CLERK           7902 17-DEC-80        800
        20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300
        30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500
        30
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
    DEPTNO
      7566 JONES      MANAGER         7839 02-APR-81       2975
        20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400
        30
<<more data snipped>>Justin

Similar Messages

  • How to get the inserted row primary key with out  using select statement

    how to return the primary key of inserted row ,with out using select statement
    Edited by: 849614 on Apr 4, 2011 6:13 AM

    yes thanks to all ,who helped me .its working fine
    getGeneratedKeys
    String hh = "INSERT INTO DIPOFFERTE (DIPOFFERTEID,AUDITUSERIDMODIFIED)VALUES(DIPOFFERTE_SEQ.nextval,?)";
              String generatedColumns[] = {"DIPOFFERTEID"};
              PreparedStatement preparedStatement = null;
              try {
                   //String gen[] = {"DIPOFFERTEID"};
                   PreparedStatement pstmt = conn.prepareStatement(hh, generatedColumns);
                   pstmt.setLong(1, 1);
                   pstmt.executeUpdate();
                   ResultSet rs = pstmt.getGeneratedKeys();
                   rs.next();
    //               The generated order id
                   long orderId = rs.getLong(1);

  • How can i get all values from jtable with out selecting?

    i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
    Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
    thanks in advance.
    raja

    You could set the table's data model to be the same:
    output2.setModel( output1.getModel() );

  • I have a an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes. All of the other movies on the card download with out a problem.

    I have an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes.
    All of the other movies on the card download with out a problem. The movie in question is not 'corrupt' as you can watch it in iMovie direct from the SD card but as soon as you try to import it, it  just says 'error'. iIve tried moving the file to an external drive ( and other variations on this theme) then importing but have had no luck.
    Can anyone please help me.

    The mystery remains....
    Thanks for the pointers. The file type is .mts (a proprietry sony one).
    I have now found some video converter software (Wondershare and iSkysoft) at a cost. Either will convert this file for me into .mp4. This I can then import into iMovie without any problems. I've checked this on the trial versions and it worked well but without paying am left with a giant watermark in the video
    The mystery (which I still havent solved) is why did 20 other .mts files import fine and then this one not?
    If you could point me in the direction of some free .mts converter software that would be the cherry on the cake.
    Thanks

  • Get parked items moved into a cleared status with out actually posting the

    Hi,
        I need to find a way to get parked items moved into a cleared status with out actually posting the item for payment.  I do not have a PO or goods receipt to post them to. There are some invoicese which we are not paying but we want to keep those items in the history of the vendor. I need to be able to run a parked report of open items and not have these pull into that report.  I have a some parked invoices  for various vendors that I need to get moved into the cleared status.
    Requesting you to provide suggestion on this to proceed.
    Thanks and regards,
    Rj.

    hi,
    i dont think there is any suh format.as per my knowledge u have to post park documents then only it would clear.
    Regards,
    Greeshma

  • My laptop died, how can I plug my ipod classic into a new pc with out losing all my music, over 10,000 songs?!

    my laptop died, how can I plug my ipod classic into a new pc with out losing all my music, over 10,000 songs?!
    Please help!

    Was your iPod previously set up to Manually Manage (where you dragged/dropped the music) or was it set to auto sync (where it started sycning as soon as you plugged it in.)?
    If it was set to Manual, you have no worries. Just continue on your way.
    If it was set to Auto, you will have to transfer your purchases or redownload them from the iTunes store.
    You're either going to have to get the other music back from the websites/CDs you got them from before or find an iPod ripping software program that will do it for you.

  • I need a code for Advanced Search based on my custom multi select listbox and query through programatically (jquery)with out design

    Hi,
    I have a grid and advanced search link buttonand
    search button.
    if i click on Advanced Search link...open a panel with 3 list boxes(multi selection)
    if i select multi selected items in list boxes and click on search-->show the grid with selected items
    getting data from Sql server custom database.
    And the code i wil expect  is 'Programatically using jqury and asp.net code' with out single line of design.
    Could you please help on the above task.

    Hi,
    I have a grid and advanced search link buttonand
    search button.
    if i click on Advanced Search link...open a panel with 3 list boxes(multi selection)
    if i select multi selected items in list boxes and click on search-->show the grid with selected items
    getting data from Sql server custom database.
    And the code i wil expect  is 'Programatically using jqury and asp.net code' with out single line of design.
    Could you please help on the above task.

  • How to select multiple records in ALV with out pressing ctrl

    Hi Experts,
    Is there a way to select multiple records in ALV with out pressing ctrl button on the key board?
    Selection and deselection should allow multiple records.
    any clue is highly appreciated.
    regards,
    Ajay

    The keyboard always plays a role, although with the Shift key you can select blocks of records.
    ○       CTRLclick, CTRLspacebar
    Toggles a selection.
    ○       SHIFTclick, CTRLshift
    Selects the area from the lead selection to the row selected. If no lead selection is set, the selection starts from the first row. In the multiNoLead mode, the selection starts from the row last selected

  • How can we handle dateformat from diff countries into india in bdc with out

    hi
    experts can u help me pz
    how can we handle dateformat from diff countries into india in bdc with out chnaging system parameters while uploading.
    i.e flatfile date is germanformat
         target date is indianformat.
    thanks and regords.

    use WRITE statement to format date.. along with extension ...
    DD/MM/YY
    or
    DD/MM/YYYY

  • How to skip a selection screen mandatory field in debugging mode with out changing the code?

    Hi Team,
    In my report there is two fields on selection screen, one is obligatory field , but i just want to execute the report(for testing per pus) with out entering  the data for the mandatory field with out changing the code. could u let me know which event and how to debug the report. or else  in debugging mode how can i change that field as non mandatory field.
    Regards,
    Venkat.

    If the value is not of importance how come it became obligatory in your program?
    Any how you can do one thing...Put some value in your obligatory field, put a debugger point where you are interested in  and use the pencil tool to change the value of the field while debugging. 
    Regards,
    Philip.

  • Display MM03 screen with out selecting views using interactive list.

    Hi Experts,
    I have one query, I am displaying  material data in a list. when i click on material number in the list it should show material data i.e should call MM03 with all the view data .
    When i am using call transaction 'MM03' skip first screen. I am able to call MM03 screen but unable to skip the View Pop up screen it should be selected default and the veiw data should be displayed.
    Ex: when i am clicking on materil number from the list it will directly take to the Basic data1 screen with out the pop up screen for selecting views.
    hope this is clear...
    Thanks
    Sunil kairam.

    Hi Dzed Maroz  ,
    Thanks for the quick reply... its works.. !
    Can you please tell me the methodology behind SET PARAMETER ID 'MXX' FIELD 'K'.
    I was trying using below code earlier was showing the pop up screen.
    SET PARAMETER ID 'MAT' FIELD P_MATNR. "
    CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    but now it works... thanks.. 
    kindly explain SET PARAMETER ID 'MXX' FIELD 'K'. hw it works...  which filed parmeter id is MXX and y we have choosen 'K' ??
    Thanks & Regards
    Sunil kairam

  • Cannot select a music into slideshow and book slideshow presentations. In the older Mac this was easy. With new Mac OS X 10.6.8 it should work as I can stop the slideshow with cursor but pop up window for choosing music is dead. I cannot drag music into i

    Cannot select a music into slideshow and book slideshow presentations. In the older Mac this was easy. With new Mac OS X 10.6.8 it should work as I can stop the slideshow with cursor but pop up window for choosing music is dead. I cannot drag music into it. Preselected music just goes on.

    I am talking about iPhoto. In my old Mac even in Books choosing slideshow gives a pop up where you can select a music from I tunes library. In this new one I can stop the slideshow with cursor and it shows music option but it is, as I said dead. Does not response at all to commands.

  • TS2180 DVDs won't play in regular DVD players iDVD burns with no errors the DVDs always get out into a folder ???

    Dear Apple friends The iDVD burns DVDs with-out any error messages but DVDs dont play in regular DVD players I notice that the DVD burns to a folder and there is no setting to prevent this How do you burn the DVD with-out it getting put into a folder ??? Thanks Mike

    That often is a result of using inferior DVD disks and burning at too high a speed.  What brand and type of disk did you use and what speed did you burn at?
    Follow this workflow to help ensure the best quality video DVD:
    Once you have the project as you want it save it as a disk image via the  File ➙ Save as Disk Image  menu option.  This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image and launch DVD Player and play it.  If it plays OK with DVD Player the encoding was good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    OT

  • Please suggest a select query / sub query with out using any subprograms or

    source table: Three columns ORIGIN, DESTINATION,MILES
    Origin      Destination Miles
    Sydney      Melbourne      1000
    Perth      Adelaide      3000
    Canberra      Melbounre      700
    Melbourne      Sydney           1000
    Brisbane      Sydney           1000
    Perth      Darwin           4000
    Sydney      Brisbane      1000
    out put :Three columns ORIGIN, DESTINATION,MILES
    Duplicate routes are to be ignored so the output is
    Origin      Destination      Miles
    Sydney      Melbourne      1000
    Perth      Adelaide      3000
    Canberra      Melbounre      700
    Brisbane      Sydney           1000
    Perth      Darwin           4000
    Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.

    Hi,
    user9368047 wrote:
    ... Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Why? If the most efficient way to get the results you want involves using a function, why wouldn't you use it?
    Here's one way, without any functions:
    SELECT     a.*
    FROM           source_table  a
    LEFT OUTER JOIN      source_table  b  ON   a.origin          = b.destination
                                          AND  a.destination       = b.origin
                          AND  a.miles          = b.miles
    WHERE   b.origin  > a.origin    -- Not b.origin > b.origin
    OR     b.origin  IS NULL
    ;If you'd care to post CREATE TABLE and INSERT statements for your sample data, then I could test this.
    Edited by: Frank Kulash on Nov 6, 2012 7:39 PM
    Corrected WHERE clause after MLVrown (below)

  • Selecting records from DB table with out using internal tables

    hi,
    i need to retrieve values from a database table based on few fields and date as well. however, i need to check whether the date is less or equal to the current date and along with that i should get the appropriate record. how can i do that with out using internal table.
    field1-----date---
    11111----
    20070219
    11111--20070214 <---
    11111----
    20070205
    in the above scenario i should get the second record
    Regards,
    Kranthi.

    Try:
    REPORT ztest MESSAGE-ID 00.
    TABLES bkpf.
    SELECT * FROM bkpf
      UP TO 1 ROWS
      WHERE budat <= sy-datum
      ORDER BY budat DESCENDING.
    ENDSELECT.
    Rob

Maybe you are looking for

  • Getting right end of text displayed in cells of a JTable column

    Hey All, Platform: WinXP, Java 5.0. I have a simple one-column table whose cells contain pathnames of user-selected files. The pathnames may be quite long, and when they're too long for the fixed width of the column (the containing JFrame is not resi

  • Play iTunes soundtrack under Keynote with Applescript

    OK, so this isn't a question, more of a solution to a question I was struggling with: how to play multiple songs in the background of a Keynote presentation. What's more, I needed that soundtrack to fade out for certain important slides that had thei

  • Time machine backup is very slow after migration to Mountain Lion

    After I migrated to mountain lion, Time machine backup is very slow. Time machine preference says there is no previous back up although I had Time machine on before migration. It did not help verymuch to connect an ethernet cable between my timecapsu

  • BO performance issues on OLAP Universes

    Hi All I am working on BO XI 3.0 and installed the SAP Integration Kit for Windows 3.0 version. I have built OLAP Universe based on BW cubes and reporting on the Universes using Web Intelligence. I am facing performance issue when trying to query on

  • Why are my text layers turning to jibberish?

    I'll try to explain everything the first time around. Adobe CC 12.2.1.5 Mid 2011 27 in IMac 2.7 GHz Intel i5 processor 8 GB 1333MHz DDR3 RAM Mac OS X Lion 10.7.5 I have Comp that is a duplicate of another Comp that I added about 20 text layers too. I