Query hanging when queries in the resultset of UNION returned no rows

Hi all,
I have a query like this.
Select * from table a
UNION
select * from table b
UNION
select * from table c
UNION
select * from table d
table a, table b, table c has some rows of data.
table d does'nt have any data.
so,
when i do union
of results of table a,table b and table c, I will get the results.
But when I include the UNION of table d(which is not having rows), Then the query is hanging.
Please help me in this regard.
Thanks in advance,
Sreekeshava S

Please find the query below.
select nn.node_name as nn_node_name,
t.template_name as t_template_name,
decode(status_flag, 0, 'NO', 'YES')
from opc_node_names nn, opc_source_templ t,
opc_node_config c, opc_change_status s
where nn.node_id = c.node_id
and c.node_id = s.object_id
and c.template_id = t.template_id
and s.object_type = 1
and s.status_type = 1
and s.value != 4
and s.value != 5
and nn.node_id not in (select node_id from opc_nodes where is_virtual=1)
union
select nn.node_name as nn_node_name,
t.template_name as t_template_name,
'Yes (Force)'
from opc_node_names nn, opc_source_templ t,
opc_node_config c, opc_change_status s
where nn.node_id = c.node_id
and s.object_id = c.node_id
and c.template_id = t.template_id
and s.object_type = 1
and s.status_type = 1
and s.value in (4, 5)
and nn.node_id not in (select node_id from opc_nodes where is_virtual=1)
union
select nn.node_name as nn_node_name,
t.template_name as t_template_name,
'(Virtual Node)'
from opc_node_names nn, opc_source_templ t,
opc_node_config c, opc_change_status s
where nn.node_id = c.node_id
and s.object_id = c.node_id
and c.template_id = t.template_id
and s.object_type = 1
and s.status_type = 1
and nn.node_id in (select node_id from opc_nodes where is_virtual=1)
union
select 'Management Server' as nn_node_name,
t.template_name as t_template_name,
decode(status_flag, 0, 'NO', 'YES')
from opc_source_templ t, opc_node_config c, opc_change_status s
where c.node_id is null
and c.template_id = t.template_id
and s.object_type = 1
and s.status_type = 1
and s.object_id = '000000000000000000000000000000000000'
and s.value != 4
and s.value != 5
union
select 'Management Server' as nn_node_name,
t.template_name as t_template_name,
'Yes (Force)'
from opc_source_templ t, opc_node_config c, opc_change_status s
where c.node_id is null
and c.template_id = t.template_id
and s.object_type = 1
and s.status_type = 1
and s.object_id = '000000000000000000000000000000000000'
and s.value in (4, 5)
In the above query,
only first 2 select select statements is having some data.
Next select statements does'nt return any data.
If we execute the select queries from the above query independently, It will execute within no time.
as i told only first 2 queries are having the data.
other sql queries does'nt have any data.
But if i union all the queries, query is hanging.
I am executing the query through SQL developer connecting to the database located in the Remote location.

Similar Messages

  • How to pass an array or structure, in addition to a query, or multiple queries to the Report Builder as parameters

    Is there a way to pass an array or structure for example as parameters, in addition to a query, or multiple queries to the Report Builder in CF8? I believe this was recommended by users to be in CF8.

    BrianO,
    Although it's been a while, I thought I'd provide the code to do this for you. It works for me in CF8, and probably will in CF7.
    Here I create a structure called My, and provide that one parameter to my CFReportParam tag.
    <CFSet My = {
    Client = "Client Name",
    ReportDateFrom = DateFormat(ThisStartDate, DateMask),
    ReportDateTo = DateFormat(ThisEndDate, DateMask),
    PageHeaderImage = ImagePath & "\Logos\Page_Header.png",
    WatermarkImage = ImagePath & "\Logos\Watermark.png",
    GetBarSummary = GetBarSummary,
    GetPieSummary = GetPieSummary
    }>
    <CFReport Template="#ReportPath#\SpendSummary.cfr" Format="PDF" Query="GetSummary">
    <CFReportParam Name="My" Value="#My#">
    </CFReport>
    Inside the report itself, reference the given parameter as Param.My.PageHeaderImage for example. It can be referenced that way from any expression inside the report builder. You can even use the queries as the data source for charts (using the Data From a Query -> Query Builder -> Advanced) by entering "Param.My.GetPieSummary" where it says "Variable containing query object".
    HTH
    Swift

  • HT2476 apps preview was hang when scroll thru the pdf documents

    I have upgraded my mbpro to mountain lion but application "preview" was hang when scroll thru the pdf documents. can somebody help me with solutions?

    From the Safari menu bar, select
              Help ▹ Installed Plug-ins
    Besides the following, what plugins are listed?
              iPhotoPhotocast
              Java
              QuickTime
              Shockwave Flash
              WebKit built-in PDF (absent in OS X 10.9 and later)

  • Safary hangs, when clicking on the link to *.dmg or *.zip file

    Hello!
    Safary hangs, when clicking on the link to *.dmg or *.zip file. If I choose "save to downloads" from drop-down menu, everything is ok, but it's not always possible to choose that on the link. For example, if I try to download and install Safary from apple web page -safary perfectly hangs.
    Sometimes I have to use other windows notebook in order to get some file from net. Its unbeliveble

    HI,
    Try maintenance..
    From the Safari Menu Bar, click Safari / Empty Cache. When you are done with that...
    From the Safari Menu Bar, click Safari / Reset Safari. Select the top 5 buttons and click Reset.
    Go to ~/Library/Safari and move the "Downloads.plist" file to the Trash.
    Go here for trouble shooting 3rd party plugins or input managers which might be causing the problem.
    http://support.apple.com/kb/TS1594
    Make sure Safari is running in 32-bit mode. Right or control click the Safari icon in the Applications folder, then click: Get Info In the Get Info window click the black disclosure triangle next to General so it faces down. Select 32 bit mode. Also, (in that same window) make sure Safari is NOT running in Rosetta.
    If you need to reinstall Safari, reinstall from your Mac install disc. Insert the Mac install disk. Open the Optional Installs folder, then open Optional Installs.mpkg An Installer will start... click Continue. When you get to the Installation Type in the window on the right you will see: Applications. Click the Disclosure triangle so it faces down. Select Safari and click continue.
    Make sure you have enough free disk space on your Mac. Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure you always have a minimum of 10% to 15% free disk space at all times.
    If nothing above helps, please post a crash log.
    How to locate a crash log:
    1. Open Finder.
    2. Click "Go" in the menu, then select "Go to Folder".
    3. Copy and paste this path into the Finder dialog:
~/Library/Logs/CrashReporter/
    4. Click the Go button.
    5. Finder opens the folder containing the crash log. Look for a the crash file with a date field that looks *like the most recent.*
    Carolyn

  • TS3804 iTunes hanging when I select the Preferences menu.

    iTunes hangs when I select the Preferences menu. Any ideas why and how to keep it from doing it again? This happens on my 3G phone and the ipod.

    Try here:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    it also includes a link for XP.

  • Ipod nano 6 gen hangs when turning off the backlight. That is, it doesn't respond to button presses on the touch screen.

    ipod nano 6 gen hangs when turning off the backlight. That is, it does not respond to button presses on the touch screen. He also has just a white screen instead of the desktop display. Tried to rearrange the screen from another Ipod nano, but nothing came of it - all the same ... What should I do?

    Hi Rc_Drifter,
    Welcome to the Support Communities!  The article below will help you troubleshoot the issue you are having with your iPod nano. Restoring the device may resolve the backlight issue as well.  
    iPod nano (6th generation): Hardware troubleshooting
    http://support.apple.com/kb/ts3474
    Display shows a white screen
    Try putting the iPod into disk mode:
    Reset the device (press the Sleep and Volume Down buttons simultaneously until the display turns black—about eight seconds).
    When the display turns black, hold down the Volume Down and Volume Up buttons simultaneously until the device enters Disk mode.
    While the device is in disk mode, sync it to iTunes and try to restore.
    I hope this information helps ....
    - Judy

  • Query hangs when getting apps schema objecs(Ebs R12) objects from BO Designer

    Hello Guys,
    We are facing an issue on Production instance that the query given by BO support hangs when getting the objects from apps schema by login from BO designer.
    We are able to get the objects from Ebs 11i instance with the same query. Below is the instances details for Ebs 11i and R12.
    Ebs R12 Application Version     : 12.1.3
    Ebs R12 DB Version                 : 11.2.0.3
    Ebs 11i Appl Ver     : 11.5.9
    Ebs 11i DB Ver       : 9.2.0.5
    Below is the query.
    SELECT NULL, u1.owner, u1.object_name, u1.object_type, NULL
        FROM all_objects u1, role_tab_privs rtp, all_tab_privs atp
       WHERE u1.object_type IN ('TABLE', 'VIEW', 'SYNONYM')
         AND u1.object_name LIKE '%' /* Type selection : can be empty */
         AND u1.owner = rtp.owner(+)
         AND u1.object_name = rtp.table_name(+)
         AND u1.owner = atp.grantee(+)
         AND 'SELECT' = atp.PRIVILEGE(+)
         AND u1.object_name = atp.table_name(+)
         AND u1.owner = 'APPS' /* Owner selection : can be empty */
    UNION
    SELECT   NULL, asy.owner, asy.synonym_name, 'SYNONYM', NULL
        FROM all_synonyms asy
       WHERE asy.synonym_name LIKE '%' /* Type selection : can be empty */
         AND asy.owner = 'APPS' /* Synonym Owner selection : can be empty */
    ORDER BY 4, 2, 3;
    Please help me out as it's very urgent. As users are unable to do transaction.
    Thanks
    Khan

    Any update experts on this issue please

  • 9i on Linux --OEM hangs when accessing through the web

    I have OMS,Intelligent agent,apache started. Downloaded and installed the JInitiator Plug-in. When I access from NT/2000 I get the Oracle Enterprise Manager Console on my screen and then it hangs. Here is the output from the java console.
    Oracle JInitiator version 1.1.8.10
    Using JRE version 1.1.8.10
    User home directory = C:\WINNT\Profiles\Ofrayman
    Proxy Configuration: Manual Configuration
    Proxy:
    Proxy Overrides: <local>
    JAR caching enabled.
    Cache directory: D:\Program Files\Oracle\JInitiator 1.1.8.10\jcache
    Maximum cache size: 50000000 bytes
    Getting JAR file sizes...
    Opening http://192.168.1.15:3339/oem_webstage/oemStage1.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemStage2.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemStage11.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemAppsMgr.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemChange.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemDiag.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemICache.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemResources.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemContext.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemDataGuard.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemLMViewer.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemImage2.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemImage3.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemImage5.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemImage6.jar no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oemLst.jar no proxy
    Total amount of JAR data to download: 0 bytes
    Loading http://192.168.1.15:3339/oem_webstage/oemStage1.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemStage2.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemStage11.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemAppsMgr.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemChange.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemDiag.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemICache.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemResources.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemContext.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemDataGuard.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemLMViewer.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemImage2.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemImage3.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemImage5.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemImage6.jar from JAR cache.
    Loading http://192.168.1.15:3339/oem_webstage/oemLst.jar from JAR cache.
    Opening http://192.168.1.15:3339/oem_webstage/oemImage1.jar no proxy
    Loading http://192.168.1.15:3339/oem_webstage/oemImage1.jar from JAR cache.
    org.omg.CORBA.NO_IMPLEMENT[completed=MAYBE]
         at com.visigenic.vbroker.orb.GiopStubDelegate.locate(GiopStubDelegate.java:399)
         at com.visigenic.vbroker.orb.GiopStubDelegate.bind(GiopStubDelegate.java:117)
         at com.visigenic.vbroker.orb.ORB.bind(ORB.java:1240)
         at com.visigenic.vbroker.orb.UnboundStubDelegate.bind(UnboundStubDelegate.java:27)
         at com.visigenic.vbroker.orb.UnboundStubDelegate.request(UnboundStubDelegate.java:115)
         at com.visigenic.vbroker.orb.UnboundStubDelegate.request(UnboundStubDelegate.java:107)
         at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:153)
         at org.omg.CosNaming._st_NamingContext.resolve(Unknown Source)
         at oracle.sysman.vxx.vxxo.VxxoORB.list(Unknown Source)
         at oracle.sysman.vxx.vxxo.VxxoEMORB.getNextBindName(Unknown Source)
         at oracle.sysman.vxx.vxxo.VxxoEMORB.bind(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.OMSConnection.initLoginServices(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.OMSConnection.doLogon(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.Client.doLogon(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.Client.silentLogin(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.Client.silentLogon(Unknown Source)
         at oracle.sysman.emSDK.client.guiComponent.logon.LogonDialogActionHandler.doLogon(Unknown Source)
         at oracle.sysman.emSDK.client.guiComponent.logon.LogonDialogActionHandler.actionPerformed(Unknown Source)
         at oracle.sysman.emSDK.client.guiComponent.logon.LogonDialog$EH.actionPerformed(Unknown Source)
         at oracle.ewt.button.PushButton.processActionEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWButton.processActionEvent(Unknown Source)
         at oracle.ewt.button.PushButton.processEventImpl(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at oracle.ewt.button.PushButton.activate(Unknown Source)
         at oracle.ewt.lwAWT.AbstractButton.processMouseReleased(Unknown Source)
         at oracle.ewt.lwAWT.AbstractButton.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Component.java:2210)
         at java.awt.Container.processEvent(Container.java:901)
         at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
         at oracle.ewt.button.PushButton.processEventImpl(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Component.java:1819)
         at java.awt.Container.dispatchEventImpl(Container.java:946)
         at java.awt.Component.dispatchEvent(Component.java:1751)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1848)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1637)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1538)
         at java.awt.Container.dispatchEventImpl(Container.java:933)
         at java.awt.Window.dispatchEventImpl(Window.java:509)
         at java.awt.Component.dispatchEvent(Component.java:1751)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    Exception occurred during event dispatching:
    java.lang.NullPointerException:
         at oracle.sysman.vxx.vxxo.VxxoBookkeeper.setBaseName(Unknown Source)
         at oracle.sysman.vxx.vxxo.VxxoEMORB.bind(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.OMSConnection.initLoginServices(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.OMSConnection.doLogon(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.Client.doLogon(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.Client.silentLogin(Unknown Source)
         at oracle.sysman.emSDK.client.omsClient.Client.silentLogon(Unknown Source)
         at oracle.sysman.emSDK.client.guiComponent.logon.LogonDialogActionHandler.doLogon(Unknown Source)
         at oracle.sysman.emSDK.client.guiComponent.logon.LogonDialogActionHandler.actionPerformed(Unknown Source)
         at oracle.sysman.emSDK.client.guiComponent.logon.LogonDialog$EH.actionPerformed(Unknown Source)
         at oracle.ewt.button.PushButton.processActionEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWButton.processActionEvent(Unknown Source)
         at oracle.ewt.button.PushButton.processEventImpl(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at oracle.ewt.button.PushButton.activate(Unknown Source)
         at oracle.ewt.lwAWT.AbstractButton.processMouseReleased(Unknown Source)
         at oracle.ewt.lwAWT.AbstractButton.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Component.java:2210)
         at java.awt.Container.processEvent(Container.java:901)
         at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
         at oracle.ewt.button.PushButton.processEventImpl(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Component.java:1819)
         at java.awt.Container.dispatchEventImpl(Container.java:946)
         at java.awt.Component.dispatchEvent(Component.java:1751)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1848)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1637)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1538)
         at java.awt.Container.dispatchEventImpl(Container.java:933)
         at java.awt.Window.dispatchEventImpl(Window.java:509)
         at java.awt.Component.dispatchEvent(Component.java:1751)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    Opening http://192.168.1.15:3339/oem_webstage/oracle/sysman/vt/console/app/ConsoleBeanInfo.class no proxy
    Opening http://192.168.1.15:3339/oem_webstage/sun/beans/infos/ConsoleBeanInfo.class no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oracle/sysman/emSDK/client/appContainer/WebApplicationBeanInfo.class no proxy
    Opening http://192.168.1.15:3339/oem_webstage/sun/beans/infos/WebApplicationBeanInfo.class no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oracle/ewt/lwAWT/BufferedAppletBeanInfo.class no proxy
    Opening http://192.168.1.15:3339/oem_webstage/sun/beans/infos/BufferedAppletBeanInfo.class no proxy
    Opening http://192.168.1.15:3339/oem_webstage/oracle/ewt/popup/PopupAppletBeanInfo.class no proxy
    Opening http://192.168.1.15:3339/oem_webstage/sun/beans/infos/PopupAppletBeanInfo.class no proxy
    java.lang.NullPointerException
         at oracle.sysman.vt.console.app.Console.start(Unknown Source)
         at sun.applet.JinitAppletPanel.run(JinitAppletPanel.java:439)
         at java.lang.Thread.run(Thread.java:466)

    as an IT, can't you fix the Outlook problem ?
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • Withing Workspace it is hanging when we select the POV

    When we want to run a BI report within the HFM Workspace (version 9.3.1.4), it is hanging / freezing on us when we want to choose a different POV. Does anyone have an idea what the issue might be?
    We currently have a workaround to click on "Preview User Point of View" and we TYPE in the members into the POV boxes, but when we choose the POV and click OK, it hangs/freezes. No error message appears. The workaround works for us at Corporate, but might be causing problems for our users world wide.
    Thanks for any input, greatly appreciate it.
    Claudia

    It does - it points to a library corruption - backup your iPhoto library and depress the option and command keys and rebuild the library - try from the last automatic database back up first - if that does not work try the other options - if those do not do it then use iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - to rebuild
    LN

  • My iPod hang when I skip the song in shuffle mode

    I always use shuffle songs and skip to find the song I wanted. I have used it for 11 months and this month my iPod hang oftenly. I send it to apple care in Thailand. They take 4 days and call me to get my iPod back. They said "There is no problem with my iPod". After I play it in the same way for a while, it hang again.
    I have called my local support. They told me that iPod is not designed to use like that. We cannot use shuffle songs and skip the song oftenly. I do not think the iPod do not support this. I used it for 11 months and have no problem. When I have the problem, they say I cannot use like this.
    Is there anyone find this problem? In shuffle songs mode, using skip oftenly. I would like to double check this problem before send it to apple again.
    Thanks.

    Hi tokepi,
    I'm having exactly the same problem, and after upgrading to the latest iTunes Version it has gotten worse.
    I'm trying to find the software to reformat the hard drive of the iPod as my suspicion is that the hard drive has errors on it, hence why the songs hang or skip to the next track.
    Unfortunately I've been unable to find the utilities to reformat the drive, but I guess that Apple must have the ability to do it, or replace the drive.
    Make sure you keep all communications with Apple as your iPoad should still be under 12 months warranty, and so if defective they should replace it free of charge.
    Good luck and let me know if they get it fixed!

  • FME2 hang when we stop the encoding

    Tested on Dell 2950 with Osprey 230 on Windows 2003 Server.
    Sometimes, the FME2 hangs when we click on "stop" to stop the
    encoding, and we have to kill the
    process or shutdown the system to restart it
    Any ideas?

    This happens on two different xp systems I'm running FME2 on;
    if I disable audio streaming it works fine. See the thread further
    down the list. Does anyone know a fix for this? It would seem that
    if this is happening to everyone, there would be a much larger hue
    and cry, but I'm stumped as to how to fix it. I think reinstalling
    FME2 got it working again, but the crash would return after one or
    two ok sessions. None of this happened with FME1

  • How to get both, the ResultSet and Output (return value) from Oracle Stored Procedure

    Hi! I am doing a conversion from MSSQL to Oracle with C++ and MFC ODBC. Any comment is appreciated!! I have Oracle 8i and Oracle ODBC 8.1.6 installed.
    My question is how to retrieve the return value AND ALSO the resultSet at the same time by using Oracle function without modifying my souce codes (except puttting mypackage. string infron of my procedure name, see below).
    -- My source code in C++ with MSSQL ....
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    Where CustoemrList is a Crecordset object...
    IN DoFieldExchange(CFieldExchange* pFX) I have ...
    //{{AFX_FIELD_MAP(CQOSDB_Group)
    pFX->SetFieldType(CFieldExchange::outputColumn);
    RFX_Long(pFX, T("Name"), mCustoemrName);
    //}}AFX_FIELD_MAP
    // output parameter
    pFX->SetFieldType( CFieldExchange::outputParam );
    RFX_Int( pFX, T("IndexCount"), mCustomerNumber);
    -- m_CustomerNumber is where i store the return value!!!
    -- In Oracle Version, i have similar codes with ...
    sqlStr.Format("{? = call mypackage.ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    -- I have oracle package/Body codes as following...
    create or replace package mypackage
    as
    type group_rct is ref cursor;
    Function listgroups(
    nameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct ) return int;
    end;
    Create or replace package body mypackage
    as
    Function listgroups(
    NameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct )return int
    IS
    BEGIN
    OPEN RC1 FOR SELECT Name
    from Customer
    WHERE ID = NameIDEND ListGroups;
    END
    return 7;
    END listgroups;
    END MyPackage;
    Ive simplified my codes a bit....
    null

    yes, it is exactly what i want to do and I am using Oracle ODBC driver.
    I tried using procedure with 1 OUT var fo numeric value and the other IN OUT ref cursor var instead of function, but error occurs when I called it from the application. It give me a memory ecxception error!!
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    it seems to me that the ? marker var is making all the trouble... can you please give me any more comment on this?? thanks!
    null

  • Query hangs when given order by clause...help needed urgent

    Hi ,
    I have a table of size 4.1 GB.
    QUERY IS :select * from rm_bil_bill order by bill_id desc;
    the column Bill_id is primary key.
    i have 6GB of temp tablespace.
    the normal select works fine but then when it is suffixed with order by clause it is hanging for ever ...
    Please help on this...
    Thanks,
    Ashlee

    HI ,
    Also like to add some information.
    The table has been analysed on july 19th,
    the explain plan for the above statement is :
    SQL> SELECT * FROM TABLE( dbms_xplan.display );
    PLAN_TABLE_OUTPUT
    Plan hash value: 178181731
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
    Time |
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 24M| 3790M| | 1006K (2)|
    03:21:17 |
    | 1 | SORT ORDER BY | | 24M| 3790M| 10G| 1006K (2)|
    03:21:17 |
    | 2 | TABLE ACCESS FULL| RM_BIL_BILL | 24M| 3790M| | 123K (5)|
    00:24:41 |
    PLAN_TABLE_OUTPUT
    9 rows selected.
    SQL> SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 178181731
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
    Time |
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 24M| 3790M| | 1006K (2)|
    03:21:17 |
    | 1 | SORT ORDER BY | | 24M| 3790M| 10G| 1006K (2)|
    03:21:17 |
    | 2 | TABLE ACCESS FULL| RM_BIL_BILL | 24M| 3790M| | 123K (5)|
    00:24:41 |
    PLAN_TABLE_OUTPUT
    9 rows selected.
    THE TABLE DESCRIPTION:
    SQL> desc rm_p01.RM_BIL_BILL
    Name Null? Type
    BILL_ID NOT NULL NUMBER(14)
    STUDENT_ID NOT NULL NUMBER(14)
    STUDENT_UIN NOT NULL VARCHAR2(20)
    BILL_MONTH NOT NULL DATE
    BILL_TYPE NOT NULL VARCHAR2(10)
    SCHOOL_CODE NOT NULL VARCHAR2(10)
    LEVEL_GRADE NOT NULL VARCHAR2(10)
    CLASS_NAME VARCHAR2(10)
    PUPIL_PROFILE_ID NOT NULL NUMBER(14)
    BAL_BROUGHT_FORWARD NOT NULL NUMBER(10,2)
    BILL_TOTAL_PAYMENT NOT NULL NUMBER(10,2)
    BILL_OUTSTANDING_BAL NOT NULL NUMBER(10,2)
    BILL_NET_CHARGES NOT NULL NUMBER(10,2)
    BILL_TOTAL_PAYABLE NOT NULL NUMBER(10,2)
    GENERATION_DATE NOT NULL DATE
    GIRO_SO_IND CHAR(1)
    GIRO_DEDUCTION_IND CHAR(1)
    GIRO_DEDUCTION_DATE DATE
    PRINT_DATA_EXTRACTION_IND CHAR(1)
    PRINT_DATA_EXTRACTION_DATE DATE
    REVIEW_IND CHAR(1)
    REVIEW_DATE DATE
    REVERSAL_MONTH DATE
    VERSION_NO NOT NULL NUMBER(6)
    CREATED_BY VARCHAR2(20)
    CREATION_DATE DATE
    LAST_UPDATED_BY VARCHAR2(20)
    LAST_UPDATED_DATE DATE
    BANK_ACCOUNT_NUMBER VARCHAR2(12)
    BANK_ACRONYM VARCHAR2(30)
    the table DDL :
    CREATE TABLE "RM_P01"."RM_BIL_BILL"
    ( "BILL_ID" NUMBER(14,0) NOT NULL ENABLE,
    "STUDENT_ID" NUMBER(14,0) NOT NULL ENABLE,
    "STUDENT_UIN" VARCHAR2(20) NOT NULL ENABLE,
    "BILL_MONTH" DATE NOT NULL ENABLE,
    "BILL_TYPE" VARCHAR2(10) NOT NULL ENABLE,
    "SCHOOL_CODE" VARCHAR2(10) NOT NULL ENABLE,
    "LEVEL_GRADE" VARCHAR2(10) NOT NULL ENABLE,
    "CLASS_NAME" VARCHAR2(10),
    "PUPIL_PROFILE_ID" NUMBER(14,0) NOT NULL ENABLE,
    "BAL_BROUGHT_FORWARD" NUMBER(10,2) NOT NULL ENABLE,
    "BILL_TOTAL_PAYMENT" NUMBER(10,2) NOT NULL ENABLE,
    "BILL_OUTSTANDING_BAL" NUMBER(10,2) NOT NULL ENABLE,
    "BILL_NET_CHARGES" NUMBER(10,2) NOT NULL ENABLE,
    "BILL_TOTAL_PAYABLE" NUMBER(10,2) NOT NULL ENABLE,
    "GENERATION_DATE" DATE NOT NULL ENABLE,
    "GIRO_SO_IND" CHAR(1),
    "GIRO_DEDUCTION_IND" CHAR(1),
    "GIRO_DEDUCTION_DATE" DATE,
    "PRINT_DATA_EXTRACTION_IND" CHAR(1),
    "PRINT_DATA_EXTRACTION_DATE" DATE,
    "REVIEW_IND" CHAR(1),
    "REVIEW_DATE" DATE,
    "REVERSAL_MONTH" DATE,
    "VERSION_NO" NUMBER(6,0) DEFAULT 0 NOT NULL ENABLE,
    "CREATED_BY" VARCHAR2(20),
    "CREATION_DATE" DATE DEFAULT SYSDATE,
    "LAST_UPDATED_BY" VARCHAR2(20),
    "LAST_UPDATED_DATE" DATE DEFAULT SYSDATE,
    "BANK_ACCOUNT_NUMBER" VARCHAR2(12),
    "BANK_ACRONYM" VARCHAR2(30),
    PRIMARY KEY ("BILL_ID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "DATAMEDIUM_RM_P" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
    STORAGE(INITIAL 4294967296 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "DATAMEDIUM_RM_P"

  • Hi ,my iphone5 hangs when i uninstalled the app

    when i unistall facebook messanger app and nimbuz app,my iphone gets hang,every time i have to reset pnone to come back for normal state.please let me know the solution
    regards
    vikas

    if you have done a reset all settings and issue still persists then do a RESTORE

  • Firefox hangs when searching in the bookmarks pane

    Since I installed the latest Firefox update today, whenever I make the Bookmarks pane visible and type in a tag or two then press return, the browser hangs and the process has to be ended. Is this a problem with today's update?

    Same problem on both of my Mac's. Rolled back to 3.6.9 and it's all good. Also tried the beta and had the same problem. Sure looks like an issue with 3.6.11

Maybe you are looking for

  • Time Machine / Disk Space / iPhoto(?)

    Ok, I'm not techy so please bare with me!! I have Time Machine & backup to an external hard drive.  I've always had 30+ days worth of backups on there. Today Time Machine says there is not enough space on my hard drive to do a backup.  I thought I'd

  • Computer Crashes When Installing Photo Gallery

    Why would my Toshiba Satellite L505D crash when trying to install Windows Live Photo Gallery? This is WIN7 64 Bit; crashes when trying to install Windows Live Essentials any version.

  • Trying to export photos with exposure adjustments from iphoto

    I made colour adjustments and exposure changes in iphoto, then exported to the library, for preparation to upload to my preferred photo hosting site, but the exposure and colour changes were not kept after exporting, is there a setting to allow this?

  • Question for BasicComboBoxEditor use in JComboBox  How can I get right ce

    I use a JComboBox as the editor for JTable.Now I met a problem In use object that BasicComboBoxEditor as the editor for JComboBox that in JTable. I can't get the cell data rightly.I can't get the editing row and column when system call getEditorCompo

  • JSP file extension: other than .jsp

    Is it possible with Tomcat to have a JSP file with an extension any other than .jsp? If it is what should I do to make it possible? Please point me to the right direction. Cheers, Alexei