User_cons_columns return no Result

Hi,
I have created the table through following query
CREATE TABLE Product
P_Id char(6), P_Name varcahr2(15), P_Price Number
CONSTRAINT Prduct_P_Id PRIMARY KEY (P_Id)Tablespace STORE;
Table created successfully
When I want to view constraint using following query
select constraint_name, column_name from user_cons_columns
where table_name='Product';
It gives the Result
no row selected
Why is this so?
Regards,
D.Abbasi

Werner, is of course, 100% correct. I just wanted to add a couple of things.
The behavior can be over ridden w/ double quotes:
create table "Products"...
will create a table name with a mixed case name.
Having said that, you shouldn't do that, unless you have a VERY, VERY good reason.
Finally, you shouldn't do that. Even if you have a VERY, VERY good reason, you're wrong. Don't do it.
-Mark

Similar Messages

  • InfoSet - returns no result after transport

    I realize I will not receive an answer to solve me problem, but hope someone can point me to how to determine my problem.
    I have an InfoSet in our BI dev system that works fine.  Previously, it was transported to our BI qas system and also worked fine.  There was a data purge and reload, and since then it stopped retrieving data.  There may have been a patch placed on the system, and changes to the InfoSet in dev which required adjusting the InfoSet.
    What I have is the BI InfoSet working in dev, but not in qas.  I have also created a duplicate of this InfoSet, and it returns no results.  I have confirmed both my InfoProviders have reportable data, and the InoProviders have matching 0materials (which is the linked between them).
    I'm open to any thoughts on what to check.  I've ran RSISET in dev, recollected the InfoSet and transported it.  The InfoSet still fails.  It's puzzling why it works in dev but not qas.
    Again, I'm open to any thoughts, however remote they might be.

    If your QA is open, then try to deactivate and re-activate the InfoSet.

  • SharePoint Foundation 2010 Search returns no results

    Hi,
    SharePoint foundation 2010 Search is not showing any results after configuring the step from the below link.
    http://wiki.sirkit.ca/2011/04/sharepoint-foundation-2010-search-returns-no-results/
    My Server Setup : 
    SharePoint Foundation 2010
    SQL Server 2008 r2
    We have created two web application and configured the search service as above mention link.
    And we have migrated a site from MOSS 2007 to SharePoint 2010 to one of  web application,we assigned search database to the newly migrated content database.
    Previously there was Form based Authentication was done on Moss 2007 site and on SP 2010 we are working on Windows authentication.
    Database showing crawl is working and showing success results as well in SQL table, Its only Not able to show the results on the page.
    Thanks in Advance
    Dinesh
    Regards, Dinesh Reddy.

    Don't look at the databases, it's a bad habit to get into and will lead to confusion.
    In search administration are you getting any sucsess messages in the crawl history and is the number of items in your index non-zero?
    If so that implies that the crawl process is working and it's the user security that's the issue.
    To confirm try searching for a file whilst logged in as the crawl account, that should return results.

  • Avoid JDBC sender error: Execute statement did not return a result set

    Hi!
    My JDBC sender adapter towards MS SQL server works fine, with an Execute statement calling a stored procedure that returns the source data needed. The stored procedure itself updates the status of database table records, so that only the unread records are returned each time the stored procedure is called.
    However, the communication channel monitoring sets a red flag for the JDBC sender adapter, when there are no values to fetch from the database table (using the stored procedure). Message says: "Database-level error reported by JDBC driver while executing statement 'EXECUTE FetchMessage 1, 9000'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor."
    This is not an error situation, as I do not expect there to be any values to fetch from the database at all times.
    I do not see how to change the stored procedure to avoid this error.
    Is there a parameter to be set on the JDBC adapter that I can use, so the red flag is avoided?
    Thanks for any input!
    Regards,
    Oeystein Emhjellen

    Hi Oeystein Emhjellen.
    The problem is Store Procedure that has to generate always a ResultSet (or cursor). If it doesn't have a output, you have to generate an Empty ResultSet.
    Like a SELECT Statement:
    If there are data, SELECT get an output result but if it get nothing the SELECT Statement get a empty ResultSet.
    Ask to your database team.
    I hope it helps you.
    Bruno.

  • Report obsolete returns diff results when backups are UNAVAIL vs AVAIL

    Hello from Nova Scotia, Canada:
    I'm wondering if someone out there who lives and breaths rman (10gR2) for a living can shed some light...
    We are finding that report obsolete (as well as delete obsolete) are returning different results depending on if our backups
    are AVAILABLE or UNAVAILABLE.
    In our shop, our backups are changed to UNAVAILABLE because they get moved to a different location later, but delete
    obsolete doesn't seem to work as expected unless the backups are AVAILABLE.
    I am pasting some output below to demonstrate my point. Basically, in the output you are about to see, I'm showing you
    my retention policy and I'm listing the backups that I have (and you can see their status is "A" for available). Then I do a
    'report obsolete' command to show you what is considered obsolete (3 files are - which is what I expected). Then I change
    all my backups to unavailable. Then I list all my backups again and show you that their status has changed to "U" for unavailable.
    Then I do 'report obsolete' again and as you can see, I get different results! Can someone explain this to me?? I have RTFManuals
    and no where does it say that availability is a factor that can impact determining what is obsolete. You also see in the output
    below what version we're using (10.2.0.4.0) and that we are using a recovery catalog.
    If someone would like to see additional information, feel free to ask, I'm more than happy to help you help me.
    I should also mention this is a 2 node rac on linux.
    Many Thanks.
    ========================================================
    $ rman target / catalog rrc/rg@RRC
    Recovery Manager: Release 10.2.0.4.0 - Production on Tue May 11 22:06:21 2010
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: IPCSD (DBID=1703825384)
    connected to recovery catalog database
    RMAN> show retention policy;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
    RMAN> list backup summary;
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag
    64093   B  F  A DISK        05/10/2010 03:06:52 2       1       NO         HOTBKUP201005100300_DB
    64122   B  A  A DISK        05/10/2010 03:08:41 1       1       NO         HOTBKUP201005100300_ARCHLOGS
    64361   B  F  A DISK        05/10/2010 21:56:33 2       1       NO         HOTBKUP201005102149_DB
    64362   B  F  A DISK        05/10/2010 21:56:37 1       1       NO         HOTBKUP201005102149_DB
    64390   B  A  A DISK        05/10/2010 21:58:02 1       1       NO         HOTBKUP201005102149_ARCHLOGS
    64508   B  F  A DISK        05/11/2010 03:07:01 2       1       NO         HOTBKUP201005110300_DB
    64509   B  F  A DISK        05/11/2010 03:07:10 1       1       NO         HOTBKUP201005110300_DB
    64544   B  A  A DISK        05/11/2010 03:07:47 1       1       NO         HOTBKUP201005110300_ARCHLOGS
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 1 days
    Report of obsolete backups and copies
    Type                 Key    Completion Time    Filename/Handle
    Backup Set           64093  05/10/2010 03:06:51
      Backup Piece       64097  05/10/2010 03:06:51 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_2_CP_1_DB
    Backup Set           64093  05/10/2010 03:04:01
      Backup Piece       64096  05/10/2010 03:04:01 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_1_CP_1_DB
    Backup Set           64122  05/10/2010 03:08:41
      Backup Piece       64125  05/10/2010 03:08:41 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1351_PC_1_CP_1_ARCHLOGS
    RMAN> change backup unavailable;
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_1_CP_1_DB recid=1533 stamp=718599624
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_2_CP_1_DB recid=1534 stamp=718599846
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1351_PC_1_CP_1_ARCHLOGS recid=1536 stamp=718600043
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1354_PC_1_CP_1_DB recid=1539 stamp=718667376
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1354_PC_2_CP_1_DB recid=1540 stamp=718667600
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB recid=1541 stamp=718667797
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1356_PC_1_CP_1_ARCHLOGS recid=1542 stamp=718667821
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1357_PC_1_CP_1_DB recid=1543 stamp=718686020
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1357_PC_2_CP_1_DB recid=1544 stamp=718686253
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1358_PC_1_CP_1_DB recid=1545 stamp=718686430
    changed backup piece unavailable
    backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1359_PC_1_CP_1_ARCHLOGS recid=1546 stamp=718686452
    Changed 11 objects to UNAVAILABLE status
    RMAN> list backup summary;
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag
    64093   B  F  U DISK        05/10/2010 03:06:52 2       1       NO         HOTBKUP201005100300_DB
    64122   B  A  U DISK        05/10/2010 03:08:41 1       1       NO         HOTBKUP201005100300_ARCHLOGS
    64361   B  F  U DISK        05/10/2010 21:56:33 2       1       NO         HOTBKUP201005102149_DB
    64362   B  F  U DISK        05/10/2010 21:56:37 1       1       NO         HOTBKUP201005102149_DB
    64390   B  A  U DISK        05/10/2010 21:58:02 1       1       NO         HOTBKUP201005102149_ARCHLOGS
    64508   B  F  U DISK        05/11/2010 03:07:01 2       1       NO         HOTBKUP201005110300_DB
    64509   B  F  U DISK        05/11/2010 03:07:10 1       1       NO         HOTBKUP201005110300_DB
    64544   B  A  U DISK        05/11/2010 03:07:47 1       1       NO         HOTBKUP201005110300_ARCHLOGS
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 1 days
    Report of obsolete backups and copies
    Type                 Key    Completion Time    Filename/Handle
    Backup Set           64362  05/10/2010 21:56:37
      Backup Piece       64366  05/10/2010 21:56:37 /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
    RMAN>I just want to point out that the one obsolete file just contains a Control File and a SPFILE, as shown below:
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    64362   Full    17.64M     DISK        00:00:02     05/10/2010 21:56:37
            BP Key: 64366   Status: UNAVAILABLE  Compressed: NO  Tag: HOTBKUP201005102149_DB
            Piece Name: /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
      Control File Included: Ckp SCN: 15213106404   Ckp time: 05/10/2010 21:56:35
      SPFILE Included: Modification time: 05/09/2010 18:00:42---------------
    **** END *****
    Edited by: user478914 on May 12, 2010 3:03 AM
    Edited by: user478914 on May 12, 2010 3:24 AM

    Thanks for reading my post. Here is the result of doing the crosscheck command.
    Problem still exists. Someone correct me if I'm wrong but I believe crosscheck does
    nothing because all my backups are listed as unavailable, so there is nothing for it to do.
    Any other thoughts or suggestions?
    This problem is driving me bonkers. I have read the Backup and Recovery Basic Guide and Advanced Guide,
    googled the web, searched OTN, searched Metalink and I can't find anything on the topic of backup
    piece availability affecting obsolescence. Many thanks.
    RMAN> list backup summary;
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag
    64361   B  F  U DISK        05/10/2010 21:56:33 2       1       NO         HOTBKUP201005102149_DB
    64362   B  F  U DISK        05/10/2010 21:56:37 1       1       NO         HOTBKUP201005102149_DB
    64390   B  A  U DISK        05/10/2010 21:58:02 1       1       NO         HOTBKUP201005102149_ARCHLOGS
    64508   B  F  U DISK        05/11/2010 03:07:01 2       1       NO         HOTBKUP201005110300_DB
    64509   B  F  U DISK        05/11/2010 03:07:10 1       1       NO         HOTBKUP201005110300_DB
    64544   B  A  U DISK        05/11/2010 03:07:47 1       1       NO         HOTBKUP201005110300_ARCHLOGS
    64761   B  F  U DISK        05/12/2010 03:06:23 2       1       NO         HOTBKUP201005120300_DB
    64762   B  F  U DISK        05/12/2010 03:06:30 1       1       NO         HOTBKUP201005120300_DB
    64792   B  A  U DISK        05/12/2010 03:08:13 1       1       NO         HOTBKUP201005120300_ARCHLOGS
    RMAN> crosscheck backup;
    using channel ORA_DISK_1
    RMAN> report obsolete recovery window of 1 days;
    Report of obsolete backups and copies
    Type                 Key    Completion Time    Filename/Handle
    Backup Set           64362  05/10/2010 21:56:37
      Backup Piece       64366  05/10/2010 21:56:37 /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
    Backup Set           64509  05/11/2010 03:07:10
      Backup Piece       64520  05/11/2010 03:07:10 /oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1358_PC_1_CP_1_DB
    RMAN>

  • "select count(*)" and "select single *" returns different result

    Good day!
    product version SAP ECC 6.0
    oracle10
    data transfers from external oracle db into customer tables using direct oracle db link
    sometimes I get case with different results from 2 statements
    *mytable has 10 rows
    *1st statement
    data: cnt type I value 0.
    select count( * ) into cnt from mytable WHERE myfield_0 = 123 and myfield_1 = '123'.
    *cnt returns 10 - correct
    *2nd statement
    select single * from  mytable WHERE myfield_0 = 123 and myfield_1 = '123'.
    *sy-dbcnt returns 0
    *sy-subrc returns 4 - incorrect, 10 rows are "invisible"
    but
    1. se16 shows correct row number
    2. I update just one row from "invisible" rows using se16 and 2nd statement returns correct result after that
    can not understand why
    thank you in advance.

    Thank you, Vishal
    but,
    general problem is that
    1. both statements have the same WHERE conditions
    2. 1st return resultset with data (sy-dbcnt=10), 2nd return empty dataset, but must return 1 in sy-dbcnt
    Yes, different meaning, you are right, but must 2nd must return 1, because of "select single *" construction, not 0.
    Dataset to process is the same, WHERE conditions are equal...
    I think the problem is that how ABAP interperets select count(*) and "select single *".
    Maybe "select count (*)" scans only PK from index page(s)? and "select single *" scans data pages? and something is wrong with that?
    I'm new in SAP and didn't find any SAP tool to trace dump of data and indexes pages with Native SQL.
    se16 shows all records.
    And why after simple manual update of just one record using se16 "select single *" returns 1?
    I've just marked one row to update, didn't change any data, then pressed "save".

  • Database is only returns one result

    I'm trying to count the number of calls & low priorty call from my account table in my databate. There is only one call so far in it. Call = 1 but its priorty is Low so Low should also be 1. I have check my sql in the Database and it return 1 result but in my program Low still = 0.
    Connection conn;
    String theNoCallsSQL = "Select call_no From Call ";
    String thePLowSQL = "Select call_no From Call where priorty = 'Low' ";
    int NoCalls = 0;
    int Low = 0;
    ResultSet rsetNoCall;
    ResultSet rsetLow;
    rsetNoCall = stmt.executeQuery(theNoCallsSQL);
    while(rsetNoCall.next() == true)
    NoCalls ++;
    rsetLow = stmt.executeQuery(thePLowSQL);
    while(rsetLow.next() == true)
    Low ++;
    conn.close();
    ArrayList myStatsList = new ArrayList();
    CallsStats myStats = new CallsStats();
    myStats.setNoCall(NoCalls);
    myStats.setNoLow(Low);
    return myStatsList;

    Haven't you heard about debugging? The simplest forum of debugging to answer your question would be to insert a line like this:System.out.println("Low++ executed");immediately before the line that saysLow++;Or you could use System.out to display the value of Low immediately beforemyStats.setNoLow(Low);The possibilities are endless.

  • How to convert Smart Form into PDF format and return the result in BAPI?

    I want to convert a Smart Form into PDF format and return the result in BAPI.
    can anyone tell me how it can be done with related example
    regards
    pranay

    hi,
    smart form to pdf--
    All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
    DATA: p_output_options TYPE ssfcompop,
    p_control_parameters TYPE ssfctrlop.
    p_control_parameters-no_dialog = 'X'.
    p_control_parameters-getotf = 'X'.
    CALL FUNCTION v_func_name "call your smartform
    EXPORTING
    output_options = p_output_options
    control_parameters = p_control_parameters
    IMPORTING
    job_output_info = s_job_output_info.
    call function 'CONVERT_OTF_2_PDF'
    tables
    otf = s_job_output_info-otfdata
    lines = t_pdf
    and if u need more u can check below links also
    Check the below links..
    Re: Smartforms to PDF
    Re: smartform (otf) as pdf and sending as email-attachment
    VISIT THIS LINK
    Re: Smartforms to PDF
    PLZ REWARD POINTS IF IT HELPS YOU
    rgds
    anver

  • Spotlight returns wrong results

    After installing Yosemite on my MacBook Pro, I tried to use Spotlight on some simple searches, with startling results. For example, I looked for Spotlight help...and a Word for Mac file opened. I recognize that Spotlight scours my Mac for material, but I do not understand why it would open a file that has nothing to do with the search terms.
    Can anyone hazard a guess about what may be happening?

    Did it and it worked to add _spotlight to the ACLs but Spotlight still return blank results on AFP clients...
    Do you know what should be the permissions on the .spotlight-V100 folder?
    Spotlight works on the servers so the index is fine. It's the AFP clients that can't read it properly or don't get all the data from it.

  • Bing based federated result sources not returning any results for non-English languages

    I have a result source with this query:
    http://www.bing.com/search?q={?searchterms}  language:fr site:msdn.microsoft.com&format=rss&count=50&first={startIndex}
    This used to give me 40-50 results for common terms like download, blog etc.
    From today (7/14) IST, this source does not return any results. There are no results if I execute this query directly in IE either.
    Same behavior observed for: language:es, language:de etc.
    I do however get results as expected for language:en.
    Any idea what the issue might be?

    Hi Swapnil,
    According to your description, my understanding is that no results returned when searching with non-English in the Result Source query.
    I tested the same scenario per your post and I got the same results as you got.
    I recommend to change the language:fr in the Result Source query to be lang=fr to see if the issue still occurs.
    More references:
    http://kbdump.com/sharepoint-2013-opensearch-search-twitter-facebook-wikipedia-page/
    http://richardstk.com/2013/11/08/sharepoint-2013-federated-search-to-bing/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • CONNECT BY query doesn't return any results...

    Hi All
    I am trying to execute this CONNECT BY query...but it does not return any result.
    Could anyone please suggests what am I doing wrong. Or how should I modify the query to get the results.
    SELECT Distinct dt.DID FROM DEPT dt left outer join EMPLOYEE emp on dt.DID = emp.DID WHERE dt.parentid in (SELECT DEPT.DID FROM DEPT CONNECT BY PRIOR DEPT.DID = DEPT.PARENTID START WITH DEPT.PARENTID in (2000,-2000)) or dt.parentid=2000
    Any help would be really really appreciated.
    Thanks and Regards
    -Josef

    Take the nested query and run it in SQL developer (or SQL Plus) against the database directly. Does it give any results? That query returning no results is the most likely cause of the problem.

  • Same Query returning different result (Different execution plan)

    Hi all,
    To day i have discovered a strange thing: a query that return a different result when using a different execution plan.
    The query :
    SELECT  *
      FROM schema.table@database a
    WHERE     column1 IN ('3')
           AND column2 = '101'
           AND EXISTS
                  (SELECT null
                     FROM schema.table2 c
                    WHERE a.column3 = SUBSTR (c.column1, 2, 12));where schema.table@database is a remote table.
    when executed with the hint /*+ ordered use_nl(a c) */ these query return no result and its execution plan is :
    Rows     Row Source Operation
          0  NESTED LOOPS  (cr=31 r=0 w=0 time=4894659 us)
       4323   SORT UNIQUE (cr=31 r=0 w=0 time=50835 us)
       4336    TABLE ACCESS FULL TABLE2 (cr=31 r=0 w=0 time=7607 us)
          0   REMOTE  (cr=0 r=0 w=0 time=130536 us)When i changed the execution plan with the hint /*+ use_hash(c a) */
    Rows     Row Source Operation
       3702  HASH JOIN SEMI (cr=35 r=0 w=0 time=497839 us)
      22556   REMOTE  (cr=0 r=0 w=0 time=401176 us)
       4336   TABLE ACCESS FULL TABLE2 (cr=35 r=0 w=0 time=7709 us)It seem that when the execution plan have changed the remote query return no result.
    It'is a bug or i have missed somthing ?
    PS: The two table are no subject to insert or update statement.
    Oracle version : 9.2.0.2.0
    System version : HP-UX v1
    Thanks.

    H.Mahmoud wrote:
    Oracle version : 9.2.0.2.0
    System version : HP-UX v1Hard to say. You're using a very old and deprecated version of the database, and one that was known to contain bugs.
    9.2.0.7 was really the lowest version of 9i that was considered to be 'stable', but even so, it's old and lacking in many ways.
    Consider upgrading to the latest database version at your earliest opportunity. (or at least apply patches up to the latest 9i version before querying if there is bugs in your really low buggy version)

  • Returning a result set/record from a dynamic query

    There seems to be plenty of examples for using Native Dynamic Sql to formulate and execute a dynamic query, however there are no examples of returning a result set or records which contain the rows of data that are retrieved by executing the query. Could someone give us an example?

    Welcome to the Oracle forum....
    CREATE OR REPLACE PACKAGE curspkg_join AS
    TYPE t_cursor IS REF CURSOR ;
    Procedure open_join_cursor1 (n_EMPNO IN NUMBER, io_cursor IN OUT t_cursor);
    END curspkg_join;
    Create the following Oracle package body on the Oracle server:
    CREATE OR REPLACE PACKAGE BODY curspkg_join AS
    Procedure open_join_cursor1 (n_EMPNO IN NUMBER, io_cursor IN OUT t_cursor)
    IS
    v_cursor t_cursor;
    BEGIN
    IF n_EMPNO <> 0
    THEN
    OPEN v_cursor FOR
    SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME
    FROM EMP, DEPT
    WHERE EMP.DEPTNO = DEPT.DEPTNO
    AND EMP.EMPNO = n_EMPNO;
    ELSE
    OPEN v_cursor FOR
    SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME
    FROM EMP, DEPT
    WHERE EMP.DEPTNO = DEPT.DEPTNO;
    END IF;
    io_cursor := v_cursor;
    END open_join_cursor1;
    END curspkg_join;
    Dim Oraclecon As New OracleConnection("Password=pwd;" & _
    "User ID=uid;Data Source=MyOracle;")
    Oraclecon.Open()
    Dim myCMD As New OracleCommand()
    myCMD.Connection = Oraclecon
    myCMD.CommandText = "curspkg_join.open_join_cursor1"
    myCMD.CommandType = CommandType.StoredProcedure
    myCMD.Parameters.Add(New OracleParameter("io_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output
    myCMD.Parameters.Add("n_Empno", OracleType.Number, 4).Value = 123
    Dim myReader As OracleDataReader
    Try
    myCMD.ExecuteNonQuery()
    Catch myex As Exception
    MsgBox(myex.Message)
    End Try
    myReader = myCMD.Parameters("io_cursor").Value
    Dim x, count As Integer
    count = 0
    Do While myReader.Read()
    For x = 0 To myReader.FieldCount - 1
    Console.Write(myReader(x) & " ")
    Next
    Console.WriteLine()
    count += 1
    Loop
    MsgBox(count & " Rows Returned.")
    myReader.Close()
    Oraclecon.Close()
    The above code is working in one of our application; which is using ref cursor as result set and get from procedure. I hope you can found more code by google and/or search in this forum as well; if above code is not useful to you.
    HTH
    Girish Sharma

  • Xquery does not return any results on 10.2.0.4, does work on 10.2.0.5

    I have a Xquery statement that works as expected on Oracle 10.2.0.5 but does not return any results on Oracle 10.2.0.4.
    Is this the result of a badly written query? A bug in 10.2.0.4?
    Is there a way to rewrite the query so that is does work on 10.2.0.4?
    Testcode:
    declare
       l_xml xmltype;
       -- Select layers with TileMatrixSet EPSG:28992
       cursor c_layer(p_xml xmltype) is
          select t.*
            from xmltable(xmlnamespaces(default 'http://www.opengis.net/wmts/1.0'
                                       ,'http://www.opengis.net/ows/1.1' as "ows"
                                        ,'http://schemas.opengis.net/gml' as "gml"
                                        ,'http://www.w3.org/1999/xlink' as "xlink"
                                        ,'http://www.w3.org/2001/XMLSchema-instance' as "xsi")
                          ,'for $d in //Layer[TileMatrixSetLink/TileMatrixSet="EPSG:28992"] return $d' passing
                          p_xml columns title varchar2(100) path 'ows:Title'
                          ,format varchar2(100) path 'Format'
                          ,style xmltype path 'Style') as t;
    begin
       l_xml := xmltype.createxml('<?xml version="1.0" encoding="UTF-8"?>
    <Capabilities xmlns="http://www.opengis.net/wmts/1.0"
    xmlns:ows="http://www.opengis.net/ows/1.1"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd"
    version="1.0.0">
    <Contents>
      <Layer>
        <ows:Title>brtachtergrondkaart</ows:Title>
        <ows:Identifier>brtachtergrondkaart</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
      <Layer>
        <ows:Title>top10nl</ows:Title>
        <ows:Identifier>top10nl</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
      <Layer>
        <ows:Title>bgt</ows:Title>
        <ows:Identifier>bgt</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
    </Contents>
    </Capabilities>');
       for r_layer in c_layer(l_xml)
       loop
          dbms_output.put_line(r_layer.title);
       end loop;
    end;Result on 10.2.0.5:
    brtachtergrondkaart
    top10nl
    bgt

    This one's strange indeed.
    I can reproduce on 10.2.0.4 and one of the following seems to fix it :
    1) Specifying the column list in the SELECT, instead of t.* :
       -- Select layers with TileMatrixSet EPSG:28992
       cursor c_layer(p_xml xmltype) is
          select t.title, t.format, t.style
            from xmltable(or,
    2) Using an extended FLWOR expression :
    for $d in //Layer
    where $d/TileMatrixSetLink/TileMatrixSet = "EPSG:28992"
    return $dMaybe you've already noticed but the problem only occurs within a PL/SQL context.
    The same query run from SQL is OK.

  • SELECT returns no result when there is a default namespace definition inXML

    Hi,
    I have a problem that my select doesn't return any result when there is a default namespace definition in my XML file.
    I'm using oracle 11g release 1
    XML file stored as a binary XML:
    <SIMS xmlns="http://sims.ics.muni.cz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://sims.ics.muni.cz jh_sims_matricni_vystupy_or.xsd">
    <Vystup Datum="2006-07-18" Typ="2" Nazev="Poslední etapy" PocetStudentu="1" PocetStudii="2">
    <Student RodneCislo="8001011001">
    <Jmeno>Petr</Jmeno>
    </Student>
    </Vystup>
    </SIMS>
    This select return no result:
    SELECT student.jmeno FROM jh_sims_bin_no_schema s, XMLTable('/SIMS/Vystup/Student' PASSING s.OBJECT_VALUE COLUMNS jmeno VARCHAR2(10) PATH 'Jmeno') student
    When I remove default namespace definition (xmlns="http://sims.ics.muni.cz") everything works fine and the same SELECT returns "Petr". Also when the file is stored in object relational storage everything works fine!
    <SIMS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://sims.ics.muni.cz jh_sims_matricni_vystupy_or.xsd">
    <Vystup Datum="2006-07-18" Typ="2" Nazev="Poslední etapy" PocetStudentu="1" PocetStudii="2">
    <Student RodneCislo="8001011001">
    <Jmeno>Petr</Jmeno>
    </Student>
    </Vystup>
    </SIMS>
    Thanks for any help!
    Jan Hruby

    Hi Jan,
    You need to specify the default namespace of the document in the XMLNamespaces clause :
    SELECT student.jmeno
    FROM jh_sims_bin_no_schema s,
         XMLTable(
          XMLNamespaces(default 'http://sims.ics.muni.cz'),
          '/SIMS/Vystup/Student'
          PASSING s.OBJECT_VALUE
          COLUMNS jmeno VARCHAR2(10) PATH 'Jmeno'
         ) student
    ;

Maybe you are looking for

  • WARNING: My Paralells 5.0 is NOT working with LION!!

    Well yesterday we have checked the Lion (Apple) Webpage and could not find any information that Lion will have problems with Parralels 5.0 Now we have the problem that our virtual windows system on Parallels 5.0 is not working anymore... We have been

  • XI acknowledge from BPM

    HI Experts, Trying to make acknowledge from XI to R/3 through BPM but get error message “Unable to convert the sender service <BPM_Process> to an ALE logical”. The XI process flow is from SAP with Idoc to XI – BPM and to JDBC. Have check setting in A

  • SCOM monitoring basics

    I realize that there are out-of-the-box monitors and alerts. But, as a learning experience, I want to view the free space on the C: drive of my production servers as a health state. It should show all of my production servers as green, unless the fre

  • Timed Events in Tasks

    Hi, I am trying to create a situation where on receipt of an xml event a task is executed however if this task is not executed within a certain time then this is notified to another user. Hence I have a start which is connected to two tasks, one task

  • Intradoc.data.DataException: !csDbFailedToGetNonEmtpyTableList,(null),SIL_OCS

    hello all, I am using UCM. When i am starting UCM server i am getting this error.Do you hve any idea about this????????????????? how to resolve.yesterday i run some clean up sql after that i start getting this error. please suggest???