Any way to use cursor values inside other cursor by bulk collect?

hi,
Is there any way to use cursor get_tables value insdide loop get column if i am using bulk collect in both cursors?
I tried a lot but i am nt able to do it.kindly help...
create or replace procedure MULTIPLE_CURSORS_PROC is
v_owner varchar2(40);
v_table_name varchar2(40);
v_column_name varchar2(100);
cursor get_tables is
select distinct tbl.owner, tbl.table_name
from all_tables tbl
where tbl.owner = 'SYSTEM';
cursor get_columns is
select distinct col.column_name
from all_tab_columns col
where col.owner = v_owner
and col.table_name = v_table_name;
begin
open get_tables;
loop
fetch get_tables into v_owner, v_table_name;
open get_columns;
loop
fetch get_columns into v_column_name;
end loop;
close get_columns;
end loop;
close get_tables;
end ;

hi there
Refer this
CREATE OR REPLACE PROCEDURE MULTIPLE_CURSORS_PROC
IS
   TYPE scol IS VARRAY (10000) OF VARCHAR2 (32767);
   v_table_name    scol;
   v_column_name   scol;
   TYPE curtyp IS REF CURSOR;
   get_columns     curtyp;
   CURSOR get_tables
   IS
      SELECT   DISTINCT tbl.table_name
        FROM   all_tables tbl
       WHERE   tbl.owner = 'SYSTEM';
BEGIN
   OPEN get_tables;
   LOOP
      FETCH get_tables BULK COLLECT INTO   v_table_name;
      FOR indx IN v_table_name.FIRST .. v_table_name.LAST
      LOOP
         SELECT   DISTINCT col.column_name
           BULK   COLLECT
           INTO   v_column_name
           FROM   all_tab_columns col
          WHERE   col.table_name = v_table_name (indx);
         FOR ind IN v_column_name.FIRST .. v_column_name.LAST
         LOOP
            DBMS_OUTPUT.put_line (v_column_name (ind));
         END LOOP;
      END LOOP;
      EXIT WHEN get_tables%NOTFOUND;
   END LOOP;
   CLOSE get_tables;
END MULTIPLE_CURSORS_PROC;regards
Hitesh

Similar Messages

  • I'm using TestStand/Labview to do a string value test. Is there any way to use a variable in the edit string value test?? This forces you to hard code a string to test against.

    I'm using TestStand 2.0/Labview 6i to do a string value test. Is there any way to use a string variable in the edit string value test instead of an actual string?? This forces you to hard code a string to test against.

    Hi ART,
    You can also use the LimitLoader step to load your string into to step similar to the Numeric Step type.
    There should be an example of this in the Resource Library | TestStand
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Any way to pass Multiple Values for a single Label in the Parameter?

    I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610"
    One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter. 
    PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data.
    Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610.
    QUESTION:
    Any way to pass Multiple Values for a single Label in the Parameter?
    I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting
    it correct.
    I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….
    Note: We are using Report Builder 3.0

    Based on my experience, there's no way to 'intercept' the query that gets passed back to SQL Server, so a Split wouldn't work.
    Try creating either a function or stored procedure using the code below (compliments to
    http://www.dotnetspider.com/resources/4680-Parse-comma-separated-string-SQL.aspx) to parse the string: 
    CREATE FUNCTION dbo.Parse(@Array VARCHAR(1000), @Separator VARCHAR(10))
    RETURNS @ResultTable TABLE (ParseValue VARCHAR(100))AS
    BEGIN
    DECLARE @SeparatorPosition INT
    DECLARE @ArrayValue VARCHAR(1000)
    SET @Array = @Array + @Separator
    WHILE PATINDEX('%' + @Separator + '%' , @Array) <> 0
    BEGIN
    SELECT @SeparatorPosition = PATINDEX('%' + @Separator + '%', @Array)
    SELECT @ArrayValue = LEFT(@Array, @SeparatorPosition - 1)
    INSERT @ResultTable VALUES (CAST(@ArrayValue AS VARCHAR))
    SELECT @Array = STUFF(@Array, 1, @SeparatorPosition, '')
    END
    RETURN
    END
    Once created you can do things like this:
    SELECT * FROM Parse('John,Bill,David,Thomas', ',')
    SELECT * FROM (SELECT 'John' AS TestName union select 'David' AS TestName) AS Main
    WHERE TestName IN (SELECT ParseValue FROM dbo.Parse('John,Bill,David,Thomas', ','))
    This is what your SQL query would probably look like:
    SELECT OperationID, OperationName FROM dbo.Operations
    WHERE AreaID IN (SELECT ParseValue FROM dbo.Parse(@Area, ','))
    You may need to fiddle around with the Separator depending on whether SQL Server inserts a space between the comma and next value.

  • Is there any way to get the files from other computer ?

    Hai all,
    I have 2 computers connected. I know the IP address of other computer. Is there any way to get the files from other computer. (for e.g. I want to get the files from specific folder. In Java netwroking is it possible? (Any programs)
    regards,
    Namanc

    Bro Take it easy.
    Think you need to send a Image file named ("abc.gif")
    now develop a server using ServerSocket and connect it in local IP and any PORT
    For example i think ur server is connected in "localhost" and 9000 port.
    Now make ur server educated using some commands.
    For example:
    FileName: <File Name String>
    [Means new file is sending by connected client]
    FileSize: <File size long or int value>
    [ So that ur server can determind about the total length of sender file]
    DataModeOpen
    [Now your client will send its image data, this command means your client software is sending data]
    fjadlkfjaofaijojfwoeiurfodkjflsajlfksa
    l23j4lj23lkjlasjfoq23j4rokjelfkjasldkf
    2o3j4lk2j3ljslakdjf2l3j4 l23kjlk23k4j
    DataModeClose
    [Means file sending finished]
    Close
    [Means your client connection is closed]
    Now develop a client supporting this command.
    For example(Server):
    String getFileName=null;
    long getFileSize=0;
    public handleCommand(String getCmd) {
        if(getCmd.startsWith("FileName")) {
                String[] splitData=getCmd.split(":");
                this.getFileName=   splitData[1];
                outPutStream.writeBytes("+OK");
        } else if(getCmd.startsWith("FileSize")) {
                String[] splitData=getCmd.split(":");
                this.getFileSize=Long.parseLong(splitData[1]);
                outPutStream.writeBytes("+OK");
        } else if(getCmd.startsWith("DataModeOpen")) {
               //data mode open so receive data
              receiveData();
              outPutStream.writeBytes("+OK");
        } else if(getCmd.startsWith("DataModeClose")) {
              //close client socket
             getClientSocket.close();
    }For client:
    DataInputStream dataIn=null;
    BufferedOutputStream bout=null;
    public sendFile(bytes[] getBytes) {
            //if ok found then do other or show error message
        if(sendCmd("FileName:"+getFileName)) {
            if(sendCmd("FileSize:"+getFileSize)) {
                if(sendCmd("DataModeOpen")) {
                   bout.write(getBytes);
                } else {
                   showError(3);
            } else {
                   showError(2);
       } else {
            showError(1);
    }i think it will help u

  • Is there any way to put the values inthe system matrix which is non editabl

    is there any way to put the values inthe system matrix which is non editable...
    this Q is not that much priority since i had achieved the requirement other way round by having user defined matrix ... but if i get the way for this it will help my add on performance much better...

    Hi Raj, I didnt get all the details but here some ideas how you can solve your issue:
    Depending in the system form you are working you can always use a DBDataSource in order to manipulate the rows in a matrix. It's much better as using the objects of the matrix itself. In this case you can use:
    oMatrix.FlushToDataSource()
    oDBDsource.SetValue("U_Quan", pVal.Row, "101")
    oMatrix.Clear()
    oMatrix.LoadFromDataSource()
    As you can see in SetValue i'm obtaining the Column, then the row number and then setting a NEW value for this cell.
    Please consider if you can use DBDataSource instead of UserDataSource.
    If the answer is yes then you can use the following:
    oMatrix.FlushToDataSource()
    '//Get the line you want
    matrix.GetLineData(pval.row)
    '//Call the Userdatasource assigned to that column
    UserDataSource = UserDataSources.Item("ItmCode")
    '//Set the new value
    m_UserDS.ValueEx = "A02520"
    oMatrix.LoadFromDataSource()
    You can also use:
    oMatrix.Columns.Item("ItemName").Cells.Item(l_rownum).Specific.String = "A02520"
    In case you are not assigning the string in a combobox of course.
    Good luck!
    Felipe

  • Any way to use filter to exclude tables in navagation pane?

    Is there any way to use filter to exclude a set of tables from the table list in the navagation pane? I have a number of tables (15+) starting with the same prefix eg. AB123 that I would like eliminate from the list. They sort right to the top and I always have to scroll down, and go through the show more dialog to see the entire list.
    I am sure I'm missing something, but not sure what. Help Center has nothing to offer.
    Thanks
    Glenn

    This has been mentioned on the forum before - basically the need for more elaborate ways to filter (multiple conditions as well as 'not like'). It is on our list for future consideration, meaning post-production.
    -- Sharon
    Message was edited by:
    sbkenned

  • Is there any way to use -useLegacyAOT option in FlashBuilder 4.6?

    I need to build my ipa with old version of Engine because i have some problems about loading images from outside. Since with Air 15 it is default engine, and i cannot quit Air 15 because of the iTunes specs. I cannot add -useLegacyAOT=yes to compiler options on Adobe Flash Builder 4.6 because it seems that it can be added at FB4.7.
    So is there any way to add this options when i am using FB4.6
    Thanks in advance.

    DeepakJ wrote:
    Hi,
    Is there any way to use a control break on Dept column in a SQL query to have a Output-2 instead of Output-1.
    Is there any way to modify the SQL query.
    SQL
    select dept, loc, count(*)
    from dept
    group by dept, locOutput-1
    Dept      Loc       Count(*)
    10         AA        1
    10         BB        2
    10         CC        2
    20         AA        2
    20         BB        2Output-2
    Dept      Loc       Count(*)
    10         AA        1
    BB        2
    CC        2
    20         AA        2
    BB        2
    Yes, using the <tt>lag</tt> analytic function and specified ordering of the data:
    select
        nullif(d.deptno, lag(d.deptno) over (order by d.deptno, d.loc, e.mgr nulls first)) deptno
      , nullif(d.loc, lag(d.loc) over (order by d.deptno, d.loc, e.mgr nulls first)) loc
      , e.mgr
      , count(*) n
    from
        dept d
          join emp e
            on d.deptno = e.deptno
    group by
        d.deptno
      , d.loc
      , e.mgr
    order by
        d.deptno
      , d.loc
      , e.mgr nulls first;
    DEPTNO  LOC       MGR   N
        10  NEW YORK         1
                      7782   1
                      7839   1
        20  DALLAS    7566   2
                      7788   1
                      7839   1
        30  CHICAGO   7698   4
                      7839   1
        40  BOSTON    7698   2
                      7902   1

  • Is there any way to print  the data inside  the Notes field of MIR6 Report

    Hello Gurús.
    We need to include the data inside the Notes field in the report MIR6 - INVOICE OVERVIEW - report.
    Is there any way to print  the data inside (comments)  the Notes field as well in the Report  ?
    We found that the only way is to open the Notes and print it, but it takes time, any idea ?
    Rgds.
    MCM.

    There's nothing built-in that does that. If you only have text fields and they don't have any formatting or other property that would prevent it (e.g., Date, character limit), you can run a simple script to populate each field with the field name, and then print. A more complicated approach would be a script that adds text annotations near/over each field that shows the field name. This would just be for documentation purposes, but it's possible. Post again if you'd like help with the first. You'll probably have to pay someone for the second approach if you don't want to do it yourself.

  • Is there any way to get the server app other that through the app store. We do not have our system conneted to a network. I typical downloaded items on a non-apple system.

    is there any way to get the server app other than through the app store. The system that I need it on are not connected to the internet.
    We run a closed-loop network of apple systems and I tipically downloaded updates on a non-apple system that was on the internet.
    Any ideas?

    I did buy the server app, went to the app store to download it. This system I'm using for downloads is Snow Leopard 10.6.8, it shows that I can download it but only as an Install which says I need 10.8. I can't seem to find a way for it to just download as a package or .dmg file so that I can copy it to DVD/CD or flash drive.

  • Is there any way to use Control Break in a SQL Query

    Hi,
    Is there any way to use a control break on Dept column in a SQL query to have a Output-2 instead of Output-1.
    Is there any way to modify the SQL query.
    SQL
    select dept, loc, count(*)
      from dept
    group by dept, locOutput-1
      Dept      Loc       Count(*)
      10         AA        1
      10         BB        2
      10         CC        2
      20         AA        2
      20         BB        2Output-2
      Dept      Loc       Count(*)
      10         AA        1
                 BB        2
                 CC        2
      20         AA        2
                 BB        2Thanks,
    Deepak

    DeepakJ wrote:
    Hi,
    Is there any way to use a control break on Dept column in a SQL query to have a Output-2 instead of Output-1.
    Is there any way to modify the SQL query.
    SQL
    select dept, loc, count(*)
    from dept
    group by dept, locOutput-1
    Dept      Loc       Count(*)
    10         AA        1
    10         BB        2
    10         CC        2
    20         AA        2
    20         BB        2Output-2
    Dept      Loc       Count(*)
    10         AA        1
    BB        2
    CC        2
    20         AA        2
    BB        2
    Yes, using the <tt>lag</tt> analytic function and specified ordering of the data:
    select
        nullif(d.deptno, lag(d.deptno) over (order by d.deptno, d.loc, e.mgr nulls first)) deptno
      , nullif(d.loc, lag(d.loc) over (order by d.deptno, d.loc, e.mgr nulls first)) loc
      , e.mgr
      , count(*) n
    from
        dept d
          join emp e
            on d.deptno = e.deptno
    group by
        d.deptno
      , d.loc
      , e.mgr
    order by
        d.deptno
      , d.loc
      , e.mgr nulls first;
    DEPTNO  LOC       MGR   N
        10  NEW YORK         1
                      7782   1
                      7839   1
        20  DALLAS    7566   2
                      7788   1
                      7839   1
        30  CHICAGO   7698   4
                      7839   1
        40  BOSTON    7698   2
                      7902   1

  • Time Machine Beautiful Background - any way to use it apart from TM

    The picture of moving universe as the background of TM processes is beautiful. Is there any way to use it apart from TM (screen saver, desktop image) ?

    Not easily. It's not a single display. The "moving parts" are separate.
    The basic background is at:
    /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Resources/vortex.p ng
    You could select and right-click it, and select it as your desktop picture, but it won't move.
    Or display it with Preview, save it as a jpg, import it into iPhoto, make an album containing it, then select the album as your screen saver.

  • Any way to use a quick and dirty icon like cLabel in the quick tools toolbar?

    I am a javascript cut-and-paster with ability to cobble things together.
    In previous versions of Acrobat, I had tools that were added to the toolbar using the technique shown in this script:
    app.addToolButton({cName: "MyFlattenButton",
       cLabel: "Flatten",
       cEnable: "event.rc = (app.doc != null);",
       cExec: "flattenPages();"
    That would create a toolbar button with the "icon" that read "Flatten" which is all that I needed.  I could click on it and it would flatten all pages in the document.
    I used this to create several different tools, all with different names and cLabels.
    This script still works in Acrobat XI (it adds the tool to the add-on tools list, and then I can add it from there to the quick tools toolbar).  The cLabel names show up in the add-on tools list, but not in the quick tools toolbar.  In the toolbar they all use the same generic icon (but they all work correctly).
    From reading in this forum I see that there is a way to create a custom icon but it does not look easy.  Is there any simple way to just have text appear as the icon as I used to do for earlier versions of Acrobat?
    Thanks.

    One further question...
    I found a code snippet somewhere online that attempted to deal with this issue.  That led me to this (failed) solution:
    this.importIcon("myIconFlat", "/D/J/CAD Standards/Stamps/Acrobat tools/flatten.jpg", 0);
    var flatIcon = util.iconStreamFromIcon(this.getIcon("myIconFlat"));
    app.addToolButton({cName: "MyFlattenButton",
       cLabel: "Flatten",
       oIcon: flatIcon,
       cEnable: "event.rc = (app.doc != null);",
       cExec: "flattenPages();"
    The problem there is that importIcon is not allowed from a folder-level javascript, apparently.  Would there be any way to use the importIcon part of this from the console and then cut and paste some output into the rest of the script?  Just looking for a way to get the icon into my script.

  • Is there a way to use EJBs directly inside WDJ without Model generation?

    Hello,
    Is there a way to use EJBs directly inside WDJ without Model generation, to avoid producing tonnes of code and reuse the JPA Entities?
    Thanks
    Sebastian
    Edited by: Sebastian Lenk on Nov 3, 2010 7:01 PM

    of course, you can.
    it's pure java programming.
    Context ctx = new InitialContext();
       Object o = ctx.lookup(
    "sap.com/HelloWorldEAR/REMOTE/HelloWorldBean/com.sap.sdn.ejb.HelloWorldRemote");
       HelloWorldRemote helloRef = (HelloWorldRemote) 
        PortableRemoteObject.narrow(o, HelloWorldRemote.class);

  • Is there any way to use a file transfer protocol to upload files to icloud?

    Is there any way to use a file transfer protocol to upload files to icloud?

    Unfortunately, no.
    You will need a 3rd party web host to upload your websites to. Depending on the version of iWeb you are using you have a couple of publishing options:
    iWeb ’09 (3.0.4) you can publish to an FTP Server or a local folder. ( With the built in FTP in iWeb you will end up with an address like “www.YourDomain.com/sitename/Home.html )
    iWeb ’08 you can publish your website to a local folder
    Basically all Web Hosting companies are iWeb-compatible.
    If you’re looking for a good hosting I would recommend IX Web Hosting I have been using them to host my own websites for several years now and that their customer support is awesome too.
    http://jeffnitschke.com/IXWebHosting.html
    http://jeffnitschke.com/wordpress/2012/06/how-do-i-move-my-mobileme-site-ix-web- hosting-blog/
    "I may receive some form of compensation from my recommendation or link."

  • Is there any way to use a MacBook Pro as a router to set up a wireless connection for XBOX live.

    Is there any way to use a MacBook Pro as a router to set up a wireless connection for XBOX live.

    Mac OS X 10.6 Help: Sharing your Internet connection

Maybe you are looking for

  • I have a work account and a personal acount I don't want the bookmarks to sync, merge or back up to the cloud. Is there a way?

    I have 2 pc's (one primary and one as a back up for work). I have on each a personal account and a work account. I seem to be unable to stop the accounts from merging (I don't want this) and I don't want anything in the cloud. Can this be resolved or

  • IPhone 5 Battery Problems

    My iPhone 5 that I got a week ago has had one real problems with the battery.  I have tried all the normal solutions like turning LTE off, location services, turning down the brightness of my screen, restarting my phone and so on. It's seems lik I ca

  • OCP hands on course

    Hi all, am going to do "Oracle Database 10g : Performance Tuning" course in an workforce development program institute. they said i will get a voucher from them.may i use the voucher to write any exam ? Or is their any limits.In simple,is those vouch

  • HR database

    Hello Gentlemen; I am newbie for ORacle world and studying Oracle... I've installed Oracle Express 11gR2 on Ubuntu and Oracle Enterprise 11gR2 on Windows but there is no famous HR databases on my servers. I have downloaded some sample databases from

  • AS - set status of NSButton (checkbox)

    Hi, i am using a checkbox on window. This window is used as a preference window. in my *droplet code* i do: on launched -- some code -- Here i want to change the status of a checkbox -> NSbutton -- where: -- myWindow is the As name of the window (not