XQuery does not return results in 10.2.0.4, works on 10.2.0.5
I have a statement Xquery which works as expected on Oracle 10.2.0.5 but returns no results on Oracle 10.2.0.4.What is the result of a query that is poorly written? A bug in 10.2.0.4?
Is it possible to rewrite the query so that is done the 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;
10.2.0.5 strategic outcome:brtachtergrondkaart
top10nl
BGT
It is indeed strange.
I can reproduce on 10.2.0.4 and follows seems to remedy:
(1) containing the list of columns in the SELECTION, 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) with the help of a FLWOR expression extended:
for $d in //Layer
where $d/TileMatrixSetLink/TileMatrixSet = "EPSG:28992"
return $d
You may have already noticed, but the problem only occurs in a context of PL/SQL.
The same query to run from SQL is OK.
Tags: Database
Similar Questions
-
ctxrule - match does not return a result
v.11.1.07 - I created a ctxrule index as described below. However, although a query must match on the given document, it does not return. Any ideas?
Then, run a query:begin ctx_ddl.create_preference('ot_lexer', 'basic_lexer'); ctx_ddl.set_attribute('ot_lexer', 'index_stems', 'ENGLOSH'); end; begin ctx_ddl.create_section_group('ot_sec_group', 'auto_section_group'); end; create table ot_profile_test (profile_id number, query clob); create index ot_profile_rule_ndx on ot_profile_test(query) indextype is ctxsys.ctxrule parameters ('stoplist ctxsys.empty_stoplist section group ot_sec_group lexer ot_lexer'); insert into ot_profile_test values(1, '($apple and $pear) and (1 within food)'); commit; exec ctxsys.ctx_adm.set_parameter('log_directory', '/yourdir'); exec ctx_output.start_log('ot'); exec ctx_output.add_event(ctx_output.event_index_print_rowid); exec ctx_output.add_event(ctx_output.event_index_print_token); exec ctx_ddl.sync_index('ot_profile_rule_ndx', '2040M', null, 1, null, ctx_ddl.lock_nowait_error); exec ctx_output.end_log;
Profile_id = 1 should not be returned?declare a clob := 'apple orange pears banana <metadata> <indicators> <food>1</food> </indicators> </metadata> '; vn_profile_id number; begin select profile_id into vn_profile_id from ot_profile_test where matches(query, a) > 0; dbms_output.put_line(vn_profile_id); end; ERROR at line 1: ORA-01403: no data found ORA-06512: at line 8
In addition, the log file should not have 2 lines written in $I?
WRITING APPLE: ((PEAR) TOKEN = (PEARS)) * ((1) IN FOOD), 0
WRITING APPLES: ((PEAR) TOKEN = (PEARS)) * ((1) IN FOOD), 0As noted earlier, you must use a list of words, not a lexer to control, like the two conflicts between them. All what you need to do is remove the following line from your code:
ctx_ddl.set_attribute ('ot_lexer', 'index_stems', 'ENGLISH');
You can still have a lexer with other attributes; Just do not set the attribute index_stems to the lexer. Set the attribute generator of forms derived from the list of words only.
-
When I return from the page of google search for a link then button does not return return
When I return from the page of google search for a link, then button does not return back. Instead, the same page refills. I need to go back click back button twice or even more. How to fix? I cheked it it another browser and there is no such behavior. It seems completele Firefox problem.
the problem was resolved after remooving extenshion «user agent overrider»
-
Printer cartridge does not return to its original position on the right side of the printer after the top cover is opened, with the resume light continues to Flash.
After restarting the printer, the cartridge moves to the right, but not all the way and remained there when the printer is off.
The printer will not print anything.
How can I get the cartridge is positioned correctly?
Solved the problem... it's a defective color print cartridge, which was the carrage Act strangely.
-
Screen turns black and does not return. One stop forced
When I leave my computer for a while, the screen turns black and does not return when I press 'enter', or any other key. I do a forced shutdown (turn off with the power button). Can I get, and the "incorrect closing" message when I turn on computer. I think that it is a problem of Hibernate. Any ideas?.
MMMOriginal title: hibernation problem?
What happens if you press Ctrl + SHIFT + ESC when you want to get out of hibernation?
You use a wireless keyboard and mouse with a transponder. What happens if you press the button on the transponder?
-
PC Windows 7 does not return the document or the printed page
I had a setting for this in XP control but can't find the page, that I got it.
This occurs in AN application, or a browser. I print from a workbook Excel specific, for example, when I have a number of them opens. The system does not return the workbook that I printed. It's maddening and causes all sorts of questions. Searching the Web for this instant product nothing and I know I can't be the only person who saw this.
It is a platform of Windows 7 in a commercial network environment. I use the snap Menu Addintools classic because I can't stand the Ribbon and never loved. In Windows 7, I run a couple of other supplements that restore the XP the taskbar properly use, so you can work efficiently.
None of the supplements are causing this problem because I was running the same classic Menu Add-in in the XP box and he had the same problem until I found workaround that I don't remember now.
Everyone knows about this problem?
Jeff Lynch
Hello Jeff,.
Please contact the Microsoft community.
As the Windows 7 computer is under the corporate network environment, the issue that you are facing is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public.
Please post your question in the TechNet Forum.
Hope the information above has been a useful answer, Mercia back to us if you respect them more.
-
Network type changes 'Public' and does not return to work when the default gateway is detected
Original title: Type of network not restored on ethernet cable reconnect.
I have a Dell Precision R5500 running Windows 7 Professional Service Pack 1. It is connected to a network that is stored as a type of 'work '. When the ethernet cable is removed and replaced network type changes to 'Public' and does not return to work when the default gateway is detected. I also have a Toshiba Tecra M10 running Window 7 Professional Service Pack 1 that initially detects the network restored as 'Public', but 'Work' once again Exchange is a connection to the default gateway. Is there a setting somewhere in the strength of the network to double check its type periodically?
Hello
You have any other network assets wireless (specifically) running on the computer?
Have another active network connection could also cause this.
Allows us to follow the methods mentioned below and see if they help.
Method 1: Run the network troubleshooter.
When the network type gets changed to 'Public' after the cable is disconnected and reconnected. The troubleshooter should let you know if there are errors with the associated services.
See the following article:
Using the troubleshooter from network in Windows 7:
http://Windows.Microsoft.com/en-us/Windows7/using-the-network-troubleshooter-in-Windows-7
Method 2: check if network discovery and file sharing options are enabled in the network and sharing Center.See the following steps:
a. click on start toreduce this top, type network and sharing Center in the Start Search box, and then click network and sharing Center in the programs list.
b. If network discovery is off, click the arrow to expand the section, click turn on network discoveryand then click apply.
Reduce this includes this imIf that you are prompted for an administrator password or for confirmation, type your password or click continue.
c. If file sharing is off, click the arrow to expand the section, click turn on file sharingand then click apply.
Collapse this includes this ima
If you are prompted for an administrator password or for confirmation, type your password, or click continue.
Method 3: Uninstall the network drivers and then install the last set of drivers on the manufacturer's Web site and check the issue.See the following steps:
(a) click Start, right click on computer.
(b) click on properties, click on Device Manager
(c) expand the network adapter, right click on the adapter option
(d) click on uninstall
(e) now go to your computer / site Web of the manufacturer of the device, download the updated drivers and install them.
Reference:
Updated a hardware driver that is not working properly:
http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly
-
Run query does not return a lines
Hello
I find that the Executequery code does not return everything.
{
pageContext.writeDiagnostics (this, "connection entry-front connection", 1);
Connection Conn = pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();
pageContext.writeDiagnostics (this, "connection entered" & conn, 1);
pageContext.writeDiagnostics (this, "input connection [AJ]" & conn, 4);
Dim Query = "select CODE a.secondary_uom_code, (select b.unit_of_measure from MTL_UNITS_OF_MEASURE b where b.uom_code = a.secondary_uom_code) GLU, xxtmxc_primary_selling_suom (: 3, a.inventory_item_id) ' PSUOM from mtl_system_items_b where a.inventory_item_id =: 1 and a.organization_id =: 2 and a.secondary_uom_code is not null ';"
'UNION select 'OUR' CODE, UOM 'Number', 10 double PSUOM;
String query = "" select secondary_uom_code CODE of mtl_system_items_b where inventory_item_id =: 1 and organization_id =: 2 and secondary_uom_code is not null '; "
pageContext.writeDiagnostics (this, ' [AJ] after the query string", 4");
pageContext.writeDiagnostics (this, "message query" + Query, 1);
PreparedStatement stmt = conn.prepareStatement (Query);
pageContext.writeDiagnostics (this, "prepared statement Post" + stmt, 1);
stmt.setString(1,Item); ver1
stmt.setString(2,Org); ver1
stmt.setInt (3, Dis.intValue ());
stmt.setString(3,Dis);
stmt.setInt (3, Ext.intValue ());
stmt.setString (3, Ext); ver1
pageContext.writeDiagnostics (this, "Post Ext after SetString" + Ext, 1);
ResultSet resultset = stmt.executeQuery ();
pageContext.writeDiagnostics (this, "Resultset" + resultset, 1);
If (resultset.next ())
for (ResultSet resultset = stmt.executeQuery ();)
ResultSet.Next ();)
While (resultset.next ())
{
String code = resultset.getString ('CODE');
String uom = resultset.getString ("UOM");
String psuom = resultset.getString ("PSUOM");
row.setAttribute ("UomCode", code);
row.setAttribute ("UnitOfMeasure", GLU);
row.setAttribute ("LineAdjustedPercent", psuom);
pageContext.writeDiagnostics (this, "secondary UOM" + resultset.getString ('CODE') + resultset.getString ("UOM") + resultset.getString ("PSUOM"), 1);
pageContext.writeDiagnostics (this, "secondary UOM" + row.getAttribute ("UomCode") + row.getAttribute ("UnitOfMeasure"), 1);
pageContext.writeDiagnostics (this, "LineAdjustedPercent" + row.getAttribute ("LineAdjustedPercent") + "PSUOM" + resultset.getString ("PSUOM"), 1);
}
ResultSet.Close ();
stmt. Close();
}
catch (SQLException sqle)
{
throw new OAException ("error in query Preparation" + sqle, OAException.INFORMATION);
}
pageContext.writeDiagnostics (this, ' [AJ] after try-catch: ", 4");
}
}
}
}
Hi Bobo,
I tried the same requirement in my local instance and changed the code for you.
Please check process requires working Code of the form below:
' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
{
OAViewObject QuoteLinesLevel70VO1Obj1 = (OAViewObject) pageContext.getApplicationModule (webBean) .findViewObject ("QuoteLinesLevel70VO1Obj");
if(QuoteLinesLevel70VO1Obj1!=null)
{
If (QuoteLinesLevel70VO1Obj1.GetCurrentRow ()! = null)
pageContext.writeDiagnostics (this, "Current Row" + QuoteLinesLevel70VO1Obj1.getCurrentRow () .getAttribute ("UomCode"), 1);
}
pageContext.writeDiagnostics (, "concluded Save Button", OAFwkConstants.STATEMENT);
If ("Event.Go".equals (pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM)))
{
OAViewObject QuoteLinesLevel70VO1Obj = (OAViewObject) pageContext.getApplicationModule (webBean) .findViewObject ("QuoteLinesLevel70VO1Obj");
if(QuoteLinesLevel70VO1Obj!=null)
{
pageContext.writeDiagnostics (thie, 'enter in Count' + QuoteLinesLevel70VO1Obj.getFetchedRowCount (), 1);
int count = QuoteLinesLevel70VO1Obj.getFetchedRowCount ();
RowSetIterator Iter = QuoteLinesLevel70VO1Obj.createRowSetIterator ("Iter");
{if(Count>0)}
Iter.setRangeStart (0);
Iter.setRangeSize (count);
for (int i = 0; i)<>
{
OAViewRowImpl row = (OAViewRowImpl) Iter.getRowAtRangeIndex (i);
If (row.getAttribute ("InventoryItemId")! = null & row.getAttribute ("OrganizationId")! = null)
{
String Item = row.getAttribute("InventoryItemId").toString ();
String Org = row.getAttribute("OrganizationId").toString ();
Number say = (Number) row.getAttribute ("LineAdjustedPercent"); LineAdjustedPercent
Dim Ext = (String) row.getAttribute ("Attribute1");
int item1 is Integer.valueOf (Item) .intValue ();. Converted entire string
int Org1 is Integer.valueOf (Org) .intValue ();. Converted entire string
Try
{
pageContext.writeDiagnostics (this, "connection entry-front connection", 1);
Connection Conn = pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();
pageContext.writeDiagnostics (this, "connection entered" & conn, 1);
pageContext.writeDiagnostics (this, "input connection [AJ]" & conn, 4);
String query = "select xxtmxc_primary_selling_suom(:1,a.inventory_item_id) PSUOM from mtl_system_items_b where a.inventory_item_id =: 2 and a.organization_id =: 3"; Index link //Changed
pageContext.writeDiagnostics (this, ' [AJ] after the query string", 4");
pageContext.writeDiagnostics (this, "message query" + Query, 1);
PreparedStatement stmt = conn.prepareStatement (Query);
pageContext.writeDiagnostics (this, "prepared statement Post" + stmt, 1);
Item1 is Integer.valueOf (Item) .intValue ();. Converted entire string
ORG1 = Integer.valueOf (Org) .intValue (); Converted entire string
pageContext.writeDiagnostics (this, "Param1 all" + item1, 1);
pageContext.writeDiagnostics (this, "Param2 all" + Org1, 1);
pageContext.writeDiagnostics (this, "Param3 all" + Ext, 1);
stmt.setString(1,Ext);
stmt.setInt(2,item1); ver1
stmt.setInt(3,Org1); ver1
pageContext.writeDiagnostics (this, "Post Ext after SetString" + Ext, 1);
for (ResultSet resultset = stmt.executeQuery (); resultset.next ();) //Used for loop in Resultset
{
String psuom = resultset.getString ("PSUOM");
pageContext.writeDiagnostics (this, "[AJ] z:" + psuom, 4 "); //Here we got the value of the function
pageContext.writeDiagnostics (this, "m [AJ]:" + Ext, 4);
}
stmt. Close();
}
catch (SQLException sqle)
{
pageContext.writeDiagnostics (this, ' [AJ] with the Exception: "+ sqle.getMessage (), 4");
throw new OAException ("error in query Preparation" + sqle, OAException.INFORMATION);
}
pageContext.writeDiagnostics (this, ' [AJ] after try-catch: ", 4");
}
}
}
}
super.processFormRequest (pageContext, webBean);
}
}Thank you
Dilip
-
sys_context procedure does not return an ip address
Hello
DB 11 GR 1 material
What would be the reason for which this query does not return an IPAddress?
Select sys_context ('userenv', 'IPAddress') of double;
Thank youWhat would be the reason for which this query does not return an IPAddress?
USERENV does not know what the IP # is.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select sys_context('userenv', 'ip_address') from dual; SYS_CONTEXT('USERENV','IP_ADDRESS') --------------------------------------------------------------------------------
Maybe it's because you are connected locally & not via SQL * Net
Published by: sb92075 on October 27, 2010 12:53
-
The new version of Skype does not see my camera. But my cam works well with all older versions. And it works with any other programs as well.
Try to uninstall the version 6.18 and install version Skype 6.14.0.104.
You can use this download link for the 6.14.0.104 version:
Don't forget to turn off the automatic updates:
Tools-> Options-> Advanced-> automatic updates-> turn off automatic updates
-
Suddenly icloud calendar does not load on my Lenovo PC. Has worked for months; iCloud contacts and photos both continue to operate. Any suggestions?
Hi scschwind,
I understand that you are having problems with your iCloud calendar on your Windows computer. Here is an article for you that will help you solve this problem:
Microsoft Windows (Microsoft Outlook)
After each step, check to see if the problem persists.
Check the system requirements
Make sure that your PC meets the system iCloud.
Check your Internet connection
- Try to go to www.apple.com. If you are unable to connect to the Internet, your iCloud calendars and events does not update in Outlook. Get help with your Internet connection.
- Try to open a secure Web site to your PC to see if you can access the ports 80 and 443. If the site does not open, you do not have access. Contact your ISP for help. Safari requires access to port 443 to push updates between iCloud and your devices.
Check your settings
ICloud opened for Windows and make sure that you are connected to the same iCloud account that you use on your other supported devices.
Update Outlook
If you have recently made changes in Outlook that are not updated on your other devices (or vice versa), click the Refresh button on Outlook.
Turn off iCloud calendar and turn it back on
- Close Outlook.
- ICloud opened for Windows.
- Uncheck the Mail, Contacts, calendars, & tasks and click on apply.
- Wait a few seconds. Select Mail, Contacts, calendars, & tasks and click on apply.
- Open Outlook.
Make sure that the Outlook Add-in iCloud is enabled in Outlook
In Outlook 2010 and later:
- Click on the file menu.
- Click Options in the left panel.
- Click on add-ins in the left panel of the window Options in Outlook.
- Look at the list of add-ins in the section Active Application Add-Ins.
- Select the Outlook Add-in iCloud.
In Outlook 2007:
- On the Tools menu, select Management Center.
- Select Add-ins in the left column.
- Look at the list of add-ins in the section Active Application Add-Ins.
- Select the Outlook Add-in iCloud.
Make sure that iCloud is not your default account in Outlook
- In Outlook 2010 and later, select file > Info > Account Settings > data files. If iCloud is listed as default account in the comments column, select another account and click on set as default.
- In Outlook 2007, select file > data file management > data files. If iCloud is listed as default account in the comments column, select another account and click on set as default.
Restart your computer
After you restart your computer, see if you solved the problem.
Find your calendar in Microsoft Outlook
- Make sure that the calendar is enabled in iCloud for Windows.
- Locate your data in the iCloud folder in Outlook. You can also view your data in deleted items in your Outlook folder list.
If you find your calendar data in the deleted items folder, it is not because iCloud deleted your data. When you turn on Mail, Contacts, calendars, & tasks in iCloud for Windows, iCloud copy your calendar for the default Outlook .pst file data in iCloud. Then iCloud removes the calendar of the .pst file data by placing it in the folder deleted in Outlook items. Calendar data then moves to the iCloud data set in Outlook so that iCloud can push data to and from Outlook.
Get help using iCloud calendar - Apple Support
https://support.Apple.com/en-us/HT203521
Thank you for using communities Support from Apple!
-
recommended security cumulative ie8 and compatible display updates fail. can install it with the installer of standalone download but then ie8 does not connect. If I remiove update ie8 works very well
Hi mikedav,
Thank you for using the Microsoft Windows Vista Forums.
Method 1:
Microsoft has released a new "Fix it" solution that should automatically solve your problems with Windows Update. Just click on the link below and follow the instructions.
How to reset the Windows Update components?
http://support.Microsoft.com/kb/971058
If you are not able to connect to the internet after you install the update, you need to optimize Internet explorer by following the instructions below.
Method 1:
Follow the instructions in the link below which will help you solve the problem.
Tips for solving problems with Internet Explorer
http://windowshelp.Microsoft.com/Windows/en-us/help/8038f9ac-9bf9-4809-8d75-fc42818d8af71033.mspx
Method 2:
Follow the instructions in the link below to optimize Internet Explorer.
How to optimize Internet Explorer
http://support.Microsoft.com/kb/936213
Please post back and let us know if it helped to solve your problem.
Kind regards
KarthiK TP
-
Remember - this is a public forum so never post private information such as numbers of mail or telephone!
Ideas: in my laptop is Explorer.exe does not load at startup on my account, his work with the guest account. Also it does not manually with the new process. Kindly help me.
I have seen at redistry Edit it's explorer.exe in winlogin sell attribute.
Hi HiteshAstan,
one) don't you recall making any changes to the computer before this happened?
(b) what exactly happens when you sign in to your account? You get a specific error message?
Step 1: Let us check if the problem persists in safe mode
Access the menu advanced startup options by turning on your computer and pressing the F8 key before Windows starts. In the advanced startup options select safe mode
http://Windows.Microsoft.com/en-us/Windows-Vista/advanced-startup-options-including-safe-mode
If the problem persists, you can deduct that the user account is corrupted
Step 2: Create a new administrator account and then try to repair your user account
Create-a-user account
http://Windows.Microsoft.com/en-us/Windows-Vista/create-a-user-account
Difficulty of a corrupted user profile
http://Windows.Microsoft.com/en-us/Windows-Vista/fix-a-corrupted-user-profile
After the back if you have any questions
Thank you, and in what concerns:
Ajay K
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think.
-
I am owner of Dreamweaver 8 comes with Macromedia Studio 8. I'm getting worried about the age of the machine which is on. Is there a way to upgrade a laptop Windows 7 which does not involve a monthly rent and allows to work on the source code of my Web site completely offline?
Thank you. Last time I looked into things with the description "Cloud", it seemed to me that you either need to be logged to the software work (possibly validate the rental date?) and/or your content of current things was 'in the cloud '.
While I don't like the rental model, if I can make it work offline that may be an option.
Fortunately, the machine still works, so I have little time to decide. It is likely that my existing sites in Dreamweaver 8 will be compatible up with current versions?
-
% ROWCOUNT SQL does not return the expected result
I have the following function within a package:
--Update APPERY_JTI_deleted_USERS table: FUNCTION fn_updt_app_jti_dlt_usr( p_update_co IN VARCHAR2, p_appery_user_id IN APPERY_JTI_deleted_USERS.appery_user_id%TYPE, p_outlet_code IN APPERY_JTI_deleted_USERS.outlet_code%TYPE) RETURN NUMBER AS lv_sql VARCHAR2(4000); lv_rowcount NUMBER := 0; BEGIN lv_sql := 'UPDATE APPERY_JTI_deleted_USERS SET '||p_update_co||' = 1 WHERE '||p_update_co||' = 0 AND OUTLET_CODE = '''||p_outlet_code||''' AND APPERY_USER_ID = '''||p_appery_user_id||''''; --EXECUTE IMMEDIATE lv_sql; EXECUTE IMMEDIATE 'BEGIN ' || lv_sql || '; :z := sql%rowcount; END; ' USING OUT lv_rowcount ; RETURN lv_rowcount; EXCEPTION WHEN OTHERS THEN RETURN -1; END fn_updt_app_jti_dlt_usr;
The function called several times as part of a job. Basically, the main function (Say M), call a few functions (for example A1... A9). Each of these functions is to do something and updated the application using the above function. Therefore, each of the nine functions will call the above function with different parameters.
The problem that I am facing is:
First run, invoke only first of all for the above function will return the positive result ($sql rowcount > 0). When I run M the second time, only first and second calls for the above function will be to return positive results and so on.
How odd, it's that if I change the values again and run a function M, it will start from the beginning. And what strange more, the dynamic update statement is executed correctly and data are updated successfully. It's just sql rowcount % do not return is not the expected results.
I tried to run execute immediately without (begin, end). I also tried to run it without HELP ON. It's always the same. I'm really confused, what Miss me here.
I don't know if this is relevant. But for what it's worth, invoking the function above updates the SAME lines in the table appery_jti_deleted_users that the columns are different. So for all the work, the same lines need to be updated. Each function (A1... A9) will call the above function to update a different column of these lines.
If you REALLY want to help you having US SHOW, not tell us:
1. WHAT you do
2. HOW to
3. WHAT results you get
4. WHAT results you expect to get
First run, invoke only first of all for the above function will return the positive result ($sql rowcount > 0). When I run M the second time, only first and second calls for the above function will be to return positive results and so on.
How odd, it's that if I change the values again and run a function M, it will start from the beginning. And what strange more, the dynamic update statement is executed correctly and data are updated successfully. It's just sql rowcount % do not return is not the expected results.
Perhaps that the foregoing is true and maybe he's not. We have NO WAY of knowing because you don't SHOW US anything.
I tried to run execute immediately without (begin, end). I also tried to run it without HELP ON. It's always the same.
Yet once you showed us NOTHING >
You do NOT FOLLOW best practices when you use dynamic sql statements: the sql statement real so that you can print:
1 SEE what's running - make sure there are no syntax errors, and it seems to be what you wanted
2 EXECUTE/TEST manually - to see if he really runs without error and see what results it really give.
3. FIX any syntax or other problems and retest it
Instrument properly your code and you won't have the problems you are having.
You should know by now what are the parameters are transmitted when you run the function. So, there are at least three sets of these parameters.
So you should be able to:
1 run the instrumented manually function three times
2. see that all three SQL statements are
3 manually run these instructions
4. see that the number of lines is after each execution
We have no idea of what the output of the function is every time you call it. Apparently, you have, if you save the results of the function somewhere, but you didn't post any of this info.
We need real details to help you - just listen to your story is not enough.
Maybe you are looking for
-
iPad does not turn on/just the Apple logo and then turn off again
I have an iPad, 4th generation, 64 GB with WiFi and cell phone, it is only 3 years and suddenly I can't turn on the iPad. When he started to act up it would freeze upwards with no icons or the button "home" in response, still on the screen, that he w
-
ENVY dv7 - 7389ca: driver missing ACPI\HPQ0004\2 &; DABA3FF &; 2
Hello world Just updated my dv7 - 7389ca to 8.1 company DESIRE. Miss me a diver, under other devices in Device Manager / unknown device Description ACPI\HPQ0004\2 & DABA3FF & 2 Thanks in advance for the help.
-
After installing windows XP Pro my computer does not start correctly
After you have installed Windows XP Pro on my HP Pavilion (updated to XP home), my computer will not end the restart process. I have repeatedly in a loop once the blue screen with the HP logo. When this has happened before after installing a pack o
-
Can I cancel ongoing updates?
original title: CANCELLATION DURING the UPDATE If Windows updates an optional program that takes too long (for example, 50% in fact)... and I just CANCEL it and TURN OFF PC altogether. When I go back and turn on the PC is there left of 50% of the up
-
Lack ETHERNET LAN controller driver
HP pavilion dm1 4035au driver help I need help please, I need driver for windows 7 Pro 32-bit ethernet Hardware ID PCI\VEN_10EC & DEV_8168 & SUBSYS_18D413C & REV_06 PCI\VEN_10EC & DEV_8168 & SUBSYS_18D413C PCI\VEN_10EC & DEV_8168 & CC_020000 PCI\VEN_