DiscoverSQL2005DBEngineDiscovery.vbs : The Query 'select * from __NAMESPACE where Name ='ComputerManagement'' returned an invalid result set.
hi
I am keep receiving this message in central administration running server in event viewer
DiscoverSQL2005DBEngineDiscovery.vbs : The Query 'select * from __NAMESPACE where Name ='ComputerManagement'' returned an invalid result set. Please check to see if this is a valid WMI Query.. Object required
adil
Hi adil,
It seems to be not related to SharePoint issue, I find a similar error post from Operations Manager forum you can take a look
Also another below article of basic troubleshooting of discovery scripts for your reference.
And for the further better assistance regarding this issue, you may want to post Operations Manager forum here.
http://social.technet.microsoft.com/Forums/systemcenter/en-US/21e9de85-5cbc-4217-8d9b-921e13dc88dc/sql-mp-issues-with-discovery-vbs-scripts?forum=operationsmanagermgmtpacks
http://blogs.technet.com/b/kevinholman/archive/2010/03/09/basic-troubleshooting-of-discovery-scripts.aspx
Thanks
Daniel Yang
TechNet Community Support
Similar Messages
-
Hi all,
On a SA 520 I got this error, every 10 seconds:
sqlite3QueryResGet failed.Query:SELECT * FROM networkInterface WHERE interfaceName=\'bdg1\
Internet access was very spoty and I couldn't reach the firewall administration on the LAN interface. Had to shutdown the appliance to get it working again.
Firmware version is 2.1.7.1
What could have happenend?
With kind regards,
JeroenHi, everything in the "Quick Reference" section should be commented out with ;
You should change those settings further down in the php.ini file.
Example:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
Last edited by adrianx (2013-07-26 12:32:02) -
Reason behind this query ,SELECT * FROM table WHERE 1 0
HEllo,
I would like to know the reason behind using this query ,
SELECT * FROM <table> WHERE 1 < 0
before executing the actual SQL query.
Is there any special reason or the JDBC receiver side is configured like that.
Is there any option to overcome this process like, can we remove this option or stop using this.
Why the JDBC adapter basically sending this query on the DB?
Thanks,
Soorya,Hi,
if you run this query, you wont be able to see any records of the table.
SELECT * FROM <table> WHERE 1 < 0
if you run this query you will see all records
SELECT * FROM <table> WHERE 0 < 1
same with SELECT * FROM <table> WHERE 1=1
So you can check this out that whats happening in your code before executing actual query. just try to co-relate.
regards
Aashish Sinha
PS : reward points if helpful -
Select from all_tables inside a procedure brings a different result set
Hi all,
There are two cases.. both are the same, but gives different out put.
CASE 1 pulls few for SYS and all for current user.
CASE 2 Pulls data for ALL USERS.
Why the same code in side a procedure brings a different result ?
SQL>
--CASE 1
CREATE OR REPLACE procedure test_t_owner as
cursor cur1 is select table_name,owner from all_Tables;
begin
for rec1 in cur1
loop
dbms_output.put_line(rec1.table_name||'--'||rec1.owner);
end loop;
end;
set serveroutpu on;
exec test_t_owner
--CASE 2
Declare
cursor cur1 is select table_name,owner from all_Tables;
begin
for rec1 in cur1
loop
dbms_output.put_line(rec1.table_name||'--'||rec1.owner);
end loop;
end;
- regards
ski create one new user
create user test identified by test;
grant connect, select any table to test;
grant dba to test;according to you then i run the procedure test_t_owner it should be give error
and i case of AB it should return all rows from all_tables.
But give output same in but sames.
Regards
Singh -
How do I do SELECT * FROM TABLE WHERE KEY IN ({list})?
The title says it all really.
Is there a reasonable performant way to perform the query
SELECT * FROM TABLE WHERE KEY IN ({list})where {list} is String []?
I am currently creating a PreparedStatement with a for loop like this StringBuffer sb = new StringBuffer ("SELECT * FROM TABLE WHERE ID IN (");
for (int ii=0;ii<keys.length;ii++) {
sb.append (keys [ii]);
if (ii != keys.length-1) sb.append (",");
sb.append (")");but this means that the prepared statement is created each time I call my method and so I'm not sure that the optimizer will find it easy to cope with. Is there a construction that I'm missing along the lines of SELECT * FROM TABLE WHERE KEY = ? where I can create the PreparedStatement once and just call setObject or something on it when the values in {list} change?but this means that the prepared statement is created
each time I call my method and so I'm not sure that
the optimizer will find it easy to cope with.You are right, the optimizer won't find that easy to deal with (presuming that is even relevant for your driver/database.) But most optimizers won't do anything with statements that change and that is what you are doing.
You could create several prepared statements which have a common number of bind variables. For example 10 statements with from 1 to 10 bind values. This will work if most of the queries use those. -
General veriable in (select * from cust where id in(:var))
hi
i deal with view object and i have this query
SELECT * FROM customers
WHERE customers.id IN (:val);
but i want pass value for val =101,201,301
how can i do it and what is the type of variable to input at the same time 1,2,3 and query filter ?
thanksthank's for your replay
i try make it string but do not success and i input the parameters from baking bean
when i try with just one value like 101 that work
but with "101,102" that do not work may be know like one variables
its mean :val="101,102" and :val variable it is string type
thank s -
SELECT FROM tab WHERE co varname -PLEASE HELP
Hi
I am trying to use a select query where col1 > 3. Instead of 3 i HAVE to use a variable name . Im getting data type mismatch in criteria expression error when i use this code:
String query ="SELECT * FROM MEMBERS WHERE M_ID > '" + myvar + "' ";
Please note that i tried using myvar as a String, int and even as a long - all in vain - resulted in same error.
What am i doing wrong in that piece of code please?
THANKS LODES
sabcarinaok thanks . like YOU said this worked:
String query= "SELECT * FROM MEMBERS WHERE M_ID >" + myvar;
So please i need to LEARN the need for single quotes in the SQL queries:
What is it used for and why ? i mean i know it is for Strings but why do we need to enclose these varnames in single quotes?
THANKS A MILLION
sabcarina -
SELECT * FROM TESTTABLE WHERE ID IN (?)
Hi,
I have a query (SELECT * FROM TESTTABLE WHERE ID IN (?)) and I want to pass in parameter a list of values (an array or something like that) to put in my condition IN.
How can I do in java ? Is there something special in the PreparedStatement ? Or have I to use another statement ?
ThanksGeoffrey,
You can formulate the sql query in the java side, and IN clause demands the arguements separates by commas,
So you can easily prepare that string by taking the values from the parameters and inserting into that String separated by commas.
Its better to that that operation in the java part rather than in the procedure if you are only running this query in that Procedure.
Thanks.
Hi,
I have a query (SELECT * FROM TESTTABLE WHERE ID IN (?)) and I want to pass in parameter a list of values (an array or something like that) to put in my condition IN.
How can I do in java ? Is there something special in the PreparedStatement ? Or have I to use another statement ?
Thanks -
Hi, I have a quick question I hope someone can help me with. I'm a student and what I'm looking for should be easy but I can't find any information on it.
Here's my code, it's probably self-explanatory but to clarify I'm trying to get a list of "Captains" in the order of who has the most wins.
The problem is that the database tables have thousands of "Captains" and I'm only supposed to look at 200 specific "Captains" which have their ssn in a specific arraylist and then return the top 80 "Captains" from that selection.
Something like this...
SELECT first 80 E.name, L.ssn, COUNT(L.wins) as Wins
FROM log L, employees E
where type matches "[Captain]"
and E.ssn = L.ssn
and L.ssn IN (...arraylist...) // How do I loop through the arraylist but still return a list of the top 80 winners?
group by E.name, L.ssn
order by Wins desc;
Should I start by taking the list of social security numbers from the arraylist and insert them into a temporary table and then use that temporary table to base my selection on?
For example:
int rows = 0;
PreparedStatement ps = conn.prepareStatement("INSERT INTO TEMP captainsTemp (ssn) VALUES(?)");
Iterator i = myArrayList.iterator();
while (i.hasNext())
// Set the variables
for (int pos = 1; pos <= 63; pos++)
String s = (String)i.next();
ps.setString(pos,s);
// insert a row
rows += ps.execute();
...and then below that I could use
"SELECT * FROM captains
WHERE ssn IN (SELECT * FROM captainTemp)..."
This looks like an ugly solution and I'm not sure if it works, sessionwise..
Everything's written in Java and SQL.
If you have any thoughts on this I would be most grateful.
I should add that this is NOT a school assignment but something I'm trying to figure out for my work...
Many thanks,
sincerely,
JT.hi,
Ignore my previous response. Try out this one. It should help you.
Lets take the example of EMP table (in Oracle's SCOTT Schema). The following is the description of the table.
SQL> desc emp
Name Null? Type
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> select ename from emp;
ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
Say, the ArrayList contains 3 names CLARK,KING & MILLER. You want to loop through the ArrayList for the ENAME values.
First construct a string like below from the ArrayList.
"ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER'";
Append this string to the normal SELECT Query
Query :
select ename from emp where ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER'
Here you get the desired output & thats pretty fast because you just do it once !!!
SQL> select ename from emp where ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER';
ENAME
CLARK
KING
MILLER
you can extend this to your Query also.
thanks,
Sriram -
Select * from viewname where 1 1 gives records back
for one customer the following sql gives records back
select * from viewname where 1<>1
we asked the customer to send over the database to us but we can't reproduce this behaviour. We don't get any records. the problem is we don't have the same version of oracle they use 9.2.0.4 and we used 10.2.0.1. i can't download the 9i version anymore.
Does anybody know of a bug in oracle which can cause such behaviour or a setting which can correct this?
Edited by: BluShadow on 09-Aug-2012 10:06
corrected the <> issue so it's visible. Please read {message:id=9360002} which describes this issue.951790 wrote:
i suspect the customer would first want us to show that their version is the problem.It doesn't work like that. If your customer called Oracle Support and said... "we're experiencing problems and our database version is 9.2.0.4"... oracle would turn around and say "that version is no longer supported, please upgrade". If they insist on knowing that their version is the problem, then the answer is "yes, it's the problem, it has known bugs and newer versions are available that address thousands of issues since"
Using a query with "where 1 <> 1" as a condition that is bringing back results, is clearly wrong. You have clearly shown that in other more recent versions of the database it is working ok, therefore you have already proven that there is a bug in the version they are using.
They are suspecting our view has a design flaw. We have in our documentation stated requirements for our software are the 9 or 10 version of oracle or sql server. So for me there are a couple of possibilities:
-we try to reproduce the query on their database on the same oracle database version as they are using - problem is we don't have this exact same version and oracle does not have this version for download on their site anymore or so it seemsThat's because it's no longer supported. Any good software house will keep on top of it's customers to ensure they are upgraded in line with Oracle's ability to support. So, partially, it's your companies fault for saying you support version 9, when clearly you can't.
--i ask other more knowledgable people(hopefully this forum) who might know about such problems which might result in a correction in the customer oracle database configuration or know of a bug in the customers version which causes this behaviour.You'll be lucky to find people still using such an old version (you're talking a version that almost 10 years out of date). The best you can do is to log onto Oracle Support and search there for known issues... and the answer on those is likely to be a recommendation to patch or upgrade too.
-we change the queries to these views so they won't try to give back any records on their serverHow will you know unless you are able to test them? -
Select * from tbl where product like ('abc','def','rgh');
Hi Guys,
My requirement is I need to filter by providing date value with some of the porduct details and prod_id may differ with product like
prod_id product date
01 abc 01/2012
02 abc 02/2012
03 def 03/2012
How can we put multiple text conditions using LIKE operator in where clause of the sql query.
if we use union to combine all the sql queries, how can we filter by entering date value.
SQL>select * from tbl where product like ('abc','def','rgh');
Please provide any ideas on the same.
Thanks in advance!
-LKselect * from tab1 where regexp_like(product,'^abc|def|rgh');
-
Anyway to supress the coulmn names in the query output from SQLPLUS
Hi,
I am using sqlplus to run a script which returns the results with column names.
Is there anyway to omit the column names from the query output from sqlplus?
I would like to have only results with out their column names in the output.
Thanks in advance!!Hi,
Maybe your LINES(IZE) isn't set ?
SCOTT>set lines 130
SCOTT>select status, machine, module
2 from v$session
3 where upper(username) = 'SCOTT';
STATUS MACHINE MODULE
INACTIVE PFAE3\VPC4894-03 TOAD 9.7.2.5
ACTIVE PFAE3\VPC4894-03 SQL*Plus
2 rows selected.
SCOTT>As an alternative to setting linesize, you can format columns:
SCOTT>set lines 80
SCOTT>col status for a8
SCOTT>col machine for a30
SCOTT>col module for a30
SCOTT>select status, machine, module
2 from v$session
3 where upper(username) = 'SCOTT';
STATUS MACHINE MODULE
INACTIVE PFAE3\VPC4894-03 TOAD 9.7.2.5
ACTIVE PFAE3\VPC4894-03 SQL*Plus
2 rows selected.
SCOTT>Regards
Peter -
How to reduce the query fetch from TKPROF output?
Hi,
Below is my query contains the TKPROF output.Here fetch is too high. How to reduce the fetch from here. And please check the explain plan is good or not?
SELECT czci.config_hdr_id,
czci.config_rev_nbr,
asoqla.quantity,
(SELECT
node_desc.LOCALIZED_STR
FROM CZ_LOCALIZED_TEXTS node_desc,
CZ_PS_NODES ps_nodes,
CZ_CONFIG_ITEMS czci1
WHERE czci1.config_hdr_id = asoqld.config_header_id
AND czci1.config_rev_nbr = asoqld.config_revision_num
AND node_desc.INTL_TEXT_ID = ps_nodes.INTL_TEXT_ID
AND NVL(node_desc.LANGUAGE,userenv('LANG')) = userenv('LANG')
AND czci1.PS_NODE_ID = ps_nodes.PERSISTENT_NODE_ID
AND ps_nodes.DEVL_PROJECT_ID = (SELECT MAX(DEVL_PROJECT_ID) FROM CZ_DEVL_PROJECTS WHERE NAME LIKE 'Control Model')
AND czci1.PARENT_CONFIG_ITEM_ID IN (SELECT sub_sub.CONFIG_ITEM_ID FROM CZ_CONFIG_ITEMS sub_sub
WHERE sub_sub.CONFIG_HDR_ID = asoqld.config_header_id
AND sub_sub.CONFIG_REV_NBR = asoqld.config_revision_num
AND sub_sub.PS_NODE_NAME = 'fittings')) fitting_material,
(SELECT
node_desc.LOCALIZED_STR
FROM CZ_LOCALIZED_TEXTS node_desc,
CZ_PS_NODES ps_nodes,
CZ_CONFIG_ITEMS czci
WHERE czci.config_hdr_id = asoqld.config_header_id
AND czci.config_rev_nbr = asoqld.config_revision_num
AND node_desc.INTL_TEXT_ID = ps_nodes.INTL_TEXT_ID
AND NVL(node_desc.LANGUAGE,userenv('LANG')) = userenv('LANG')
AND czci.PS_NODE_ID = ps_nodes.PERSISTENT_NODE_ID
AND ps_nodes.DEVL_PROJECT_ID = (SELECT MAX(DEVL_PROJECT_ID) FROM CZ_DEVL_PROJECTS WHERE NAME LIKE 'Control Model')
AND czci.PARENT_CONFIG_ITEM_ID IN (SELECT sub_sub.CONFIG_ITEM_ID FROM CZ_CONFIG_ITEMS sub_sub
WHERE sub_sub.CONFIG_HDR_ID = czci.CONFIG_HDR_ID
AND sub_sub.CONFIG_REV_NBR = czci.CONFIG_REV_NBR
AND sub_sub.PS_NODE_NAME = 'tubing')) tubing_material
FROM aso_quote_lines_all asoqla,
aso_quote_line_details asoqld,
cz_config_items czci
WHERE asoqla.quote_header_id = 55774
AND asoqla.item_type_code = 'MDL'
--AND asoqla.org_id = 2763
AND asoqla.quote_line_id = asoqld.quote_line_id
AND asoqld.config_header_id = czci.config_hdr_id
AND asoqld.config_revision_num = czci.config_rev_nbr
AND czci.ps_node_name = 'CONTROL MASTER ASLY'
call count cpu elapsed disk query current rows
Parse 1 0.04 0.03 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 3 0.09 0.08 0 5100 0 19
total 5 0.13 0.12 0 5100 0 19
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user id: 173 (APPS)
Rows Row Source Operation
3 TABLE ACCESS BY INDEX ROWID CZ_LOCALIZED_TEXTS (cr=2161 pr=0 pw=0 time=32425 us)
40 NESTED LOOPS (cr=2158 pr=0 pw=0 time=32276 us)
3 NESTED LOOPS (cr=2147 pr=0 pw=0 time=32156 us)
3 NESTED LOOPS (cr=925 pr=0 pw=0 time=15885 us)
3 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=665 pr=0 pw=0 time=13456 us)
5490 INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=96 pr=0 pw=0 time=1237 us)(object id 3049621)
3 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=260 pr=0 pw=0 time=2401 us)
1094 INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=19 pr=0 pw=0 time=250 us)(object id 3049621)
3 TABLE ACCESS BY INDEX ROWID CZ_PS_NODES (cr=1222 pr=0 pw=0 time=16249 us)
3 INDEX RANGE SCAN CZ_PS_NODES_N12 (cr=1219 pr=0 pw=0 time=16211 us)(object id 750095)
1 SORT AGGREGATE (cr=1211 pr=0 pw=0 time=16125 us)
209 TABLE ACCESS FULL CZ_DEVL_PROJECTS (cr=1211 pr=0 pw=0 time=15883 us)
18 INDEX RANGE SCAN CZ_LOCALIZED_TEXTS_N1 (cr=11 pr=0 pw=0 time=68 us)(object id 31504)
3 TABLE ACCESS BY INDEX ROWID CZ_LOCALIZED_TEXTS (cr=2161 pr=0 pw=0 time=31499 us)
40 NESTED LOOPS (cr=2158 pr=0 pw=0 time=31351 us)
3 NESTED LOOPS (cr=2147 pr=0 pw=0 time=31215 us)
3 NESTED LOOPS (cr=925 pr=0 pw=0 time=15271 us)
3 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=665 pr=0 pw=0 time=12441 us)
5490 INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=96 pr=0 pw=0 time=1230 us)(object id 3049621)
3 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=260 pr=0 pw=0 time=2795 us)
1094 INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=19 pr=0 pw=0 time=264 us)(object id 3049621)
3 TABLE ACCESS BY INDEX ROWID CZ_PS_NODES (cr=1222 pr=0 pw=0 time=15920 us)
3 INDEX RANGE SCAN CZ_PS_NODES_N12 (cr=1219 pr=0 pw=0 time=15863 us)(object id 750095)
1 SORT AGGREGATE (cr=1211 pr=0 pw=0 time=15753 us)
209 TABLE ACCESS FULL CZ_DEVL_PROJECTS (cr=1211 pr=0 pw=0 time=15452 us)
18 INDEX RANGE SCAN CZ_LOCALIZED_TEXTS_N1 (cr=11 pr=0 pw=0 time=79 us)(object id 31504)
19 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=778 pr=0 pw=0 time=20571 us)
5816 NESTED LOOPS (cr=202 pr=0 pw=0 time=8497 us)
21 NESTED LOOPS (cr=96 pr=0 pw=0 time=2037 us)
23 TABLE ACCESS BY INDEX ROWID ASO_QUOTE_LINES_ALL (cr=47 pr=0 pw=0 time=1427 us)
1058 INDEX RANGE SCAN ASO_QUOTE_LINES_ALL_N1 (cr=9 pr=0 pw=0 time=51 us)(object id 81688)
21 TABLE ACCESS BY INDEX ROWID ASO_QUOTE_LINE_DETAILS (cr=49 pr=0 pw=0 time=596 us)
21 INDEX RANGE SCAN ASO_QUOTE_LINE_DETAILS_N1 (cr=28 pr=0 pw=0 time=323 us)(object id 81706)
5794 INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=106 pr=0 pw=0 time=1424 us)(object id 3049621)Hi
After affed the exist operator i got below output. But it is more than that the previous one.
SELECT czci.config_hdr_id, czci.config_rev_nbr, asoqla.quantity,
(SELECT node_desc.localized_str
FROM cz_localized_texts node_desc,
cz_ps_nodes ps_nodes,
cz_config_items czci1
WHERE czci1.config_hdr_id = asoqld.config_header_id
AND czci1.config_rev_nbr = asoqld.config_revision_num
AND node_desc.intl_text_id = ps_nodes.intl_text_id
AND NVL (node_desc.LANGUAGE, USERENV ('LANG')) = USERENV ('LANG')
AND czci1.ps_node_id = ps_nodes.persistent_node_id
AND ps_nodes.devl_project_id = (SELECT MAX (devl_project_id)
FROM cz_devl_projects
WHERE NAME = 'Control Model')
AND EXISTS (
SELECT NULL
FROM cz_config_items sub_sub
WHERE sub_sub.config_hdr_id = asoqld.config_header_id
AND sub_sub.config_rev_nbr = asoqld.config_revision_num
AND sub_sub.ps_node_name = 'fittings'
AND czci1.parent_config_item_id = sub_sub.config_item_id))
fitting_material,
(SELECT node_desc.localized_str
FROM cz_localized_texts node_desc,
cz_ps_nodes ps_nodes,
cz_config_items czci1
WHERE czci1.config_hdr_id = asoqld.config_header_id
AND czci1.config_rev_nbr = asoqld.config_revision_num
AND node_desc.intl_text_id = ps_nodes.intl_text_id
AND node_desc.LANGUAGE = USERENV ('LANG')
AND czci1.ps_node_id = ps_nodes.persistent_node_id
AND ps_nodes.devl_project_id = (SELECT MAX (devl_project_id)
FROM cz_devl_projects
WHERE NAME = 'Control Model')
AND EXISTS (
SELECT NULL
FROM cz_config_items sub_sub
WHERE sub_sub.config_hdr_id = czci.config_hdr_id
AND sub_sub.config_rev_nbr = czci.config_rev_nbr
AND sub_sub.ps_node_name = 'tubing'
AND czci1.parent_config_item_id = sub_sub.config_item_id))
tubing_material
FROM aso_quote_lines_all asoqla,
aso_quote_line_details asoqld,
cz_config_items czci
WHERE asoqla.quote_header_id = 55774
AND asoqla.item_type_code = 'MDL'
--AND asoqla.org_id = 2763
AND asoqla.quote_line_id = asoqld.quote_line_id
AND asoqld.config_header_id = czci.config_hdr_id
AND asoqld.config_revision_num = czci.config_rev_nbr
AND czci.ps_node_name = 'CONTROL MASTER ASLY'
call count cpu elapsed disk query current rows
Parse 1 0.02 0.03 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 3 0.16 0.14 0 16526 0 19
total 5 0.18 0.17 0 16526 0 19
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user id: 173 (APPS)
Rows Row Source Operation
3 TABLE ACCESS BY INDEX ROWID CZ_LOCALIZED_TEXTS (cr=7874 pr=0 pw=0 time=51192 us)
40 NESTED LOOPS (cr=7871 pr=0 pw=0 time=50953 us)
3 NESTED LOOPS (cr=7860 pr=0 pw=0 time=50729 us)
3 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=6638 pr=0 pw=0 time=33183 us)
3 INDEX RANGE SCAN CZ_CONFIG_ITEMS_N1 (cr=6635 pr=0 pw=0 time=33060 us)(object id 31734)
3 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=6536 pr=0 pw=0 time=22873 us)
1292 INDEX UNIQUE SCAN CZ_CONFIG_ITEMS_PK (cr=5244 pr=0 pw=0 time=15326 us)(object id 3049621)
3 TABLE ACCESS BY INDEX ROWID CZ_PS_NODES (cr=1222 pr=0 pw=0 time=17483 us)
3 INDEX RANGE SCAN CZ_PS_NODES_N12 (cr=1219 pr=0 pw=0 time=17411 us)(object id 750095)
1 SORT AGGREGATE (cr=1211 pr=0 pw=0 time=17266 us)
209 TABLE ACCESS FULL CZ_DEVL_PROJECTS (cr=1211 pr=0 pw=0 time=16844 us)
18 INDEX RANGE SCAN CZ_LOCALIZED_TEXTS_N1 (cr=11 pr=0 pw=0 time=122 us)(object id 31504)
3 NESTED LOOPS (cr=7874 pr=0 pw=0 time=48203 us)
3 NESTED LOOPS (cr=7860 pr=0 pw=0 time=47973 us)
3 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=6638 pr=0 pw=0 time=30352 us)
3 INDEX RANGE SCAN CZ_CONFIG_ITEMS_N1 (cr=6635 pr=0 pw=0 time=30218 us)(object id 31734)
3 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=6536 pr=0 pw=0 time=20960 us)
1292 INDEX UNIQUE SCAN CZ_CONFIG_ITEMS_PK (cr=5244 pr=0 pw=0 time=14224 us)(object id 3049621)
3 TABLE ACCESS BY INDEX ROWID CZ_PS_NODES (cr=1222 pr=0 pw=0 time=17570 us)
3 INDEX RANGE SCAN CZ_PS_NODES_N12 (cr=1219 pr=0 pw=0 time=17510 us)(object id 750095)
1 SORT AGGREGATE (cr=1211 pr=0 pw=0 time=17395 us)
209 TABLE ACCESS FULL CZ_DEVL_PROJECTS (cr=1211 pr=0 pw=0 time=16937 us)
3 TABLE ACCESS BY INDEX ROWID CZ_LOCALIZED_TEXTS (cr=14 pr=0 pw=0 time=165 us)
3 INDEX UNIQUE SCAN CZ_LOCALIZED_TEXTS_PK (cr=11 pr=0 pw=0 time=132 us)(object id 3050530)
19 TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=778 pr=0 pw=0 time=41677 us)
5816 NESTED LOOPS (cr=202 pr=0 pw=0 time=16173 us)
21 NESTED LOOPS (cr=96 pr=0 pw=0 time=3617 us)
23 TABLE ACCESS BY INDEX ROWID ASO_QUOTE_LINES_ALL (cr=47 pr=0 pw=0 time=2528 us)
1058 INDEX RANGE SCAN ASO_QUOTE_LINES_ALL_N1 (cr=9 pr=0 pw=0 time=83 us)(object id 81688)
21 TABLE ACCESS BY INDEX ROWID ASO_QUOTE_LINE_DETAILS (cr=49 pr=0 pw=0 time=1053 us)
21 INDEX RANGE SCAN ASO_QUOTE_LINE_DETAILS_N1 (cr=28 pr=0 pw=0 time=598 us)(object id 81706)
5794 INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=106 pr=0 pw=0 time=8245 us)(object id 3049621) -
Can I simulate SELECT * FROM TABLE WHERE ROW IN (1111,2222) using SQLJ
I have a fct like
public void fct(String inStr) {
String str = "SELECT * FROM TABLE WHERE ROW IN" + inStr;
// then I xecute the query using JDBC connection
But I want to do the same thisn using SQLJ like:
public void fct(String inStr) {
#sql [nctx] iter = { SELECT * FROM TABLE WHERE ROW IN :inStr}
When I run the second version and give a parameter like "(1111,2222)" it gives
ORA-01722: invalid number error.
Is there a way to give parameters to in clauses of SQLJ statements.
Thanks in regard.This is a SQLJ FAQ. You can find the FAQ at:
http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html
Your question is addressed in the following section:
http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#variablesizevaluelist
Note that that section has a typo. The lines:
? // populate mynumbers
#sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),?};
should read:
... // populate mynumbers
#sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),...};
By the way, with the next release SQLJ will support pasting in of dynamic SQL fragments. Then you'll be able to do pretty much what you are trying to accomplish here (albeit with slightly different syntax). Until then you'd have to use the workarounds from the FAQ. -
Retrieve optimize: select * from tb where mdate sysdate
hi,
i wrote a simple statement :
select * from tb where mdate > sysdate;
it takes long time to return resultset.
when i use to_char() function,
select * from tb where to_char(mdate,'yyyy-mm-dd') >
to_char(sysdate,'yyyy-mm-dd');
it runs faster.
who can tell me why?
thanks.Are you running each statement multiple times and averaging the results? If you run the date comparison once, then run the character comparison, it's likely that the data you want is already cached, so the secod statement may well return more quickly. If you average multiple runs, you can avoid this.
Justin
Maybe you are looking for
-
Second iMac;what happens if you daisy-chain, how to do it?
I recently bought a new iMac quad-core i7, 27". I am interested in the possibility of using the earlier iMac,which is a 2.4 dual core 24" running Snowy as a second HD and as my dual monitor- would like to try to get it to act as extended desktop moni
-
Place InfoObjects under InfoObject Catalog
Hi Guys, I have few InfoObjects (IO) under unassigned infoarea and want to place under particular infoarea. I am telling IO name, IO Catalog name etc. reading a tab delimited text file which are already exists in server. Here is the structure: IO_CAT
-
Inbound deliveries and SHort Deliveries
Hi All I have the following Scenario. We have a central warehouse that receive goods from our Suppliers.Once the goods are received the Depot creates Inbound Delivery and sends the goods of the the mine. For eg Purchase Order from mine is for 100. th
-
BBP_EXTREQ - R/3 Outqueue runs on an error
Hi @ all, currently we have a problem with the transfer of external requirements from R/3 (4.7, SAP_APPL=0024, PI=0013) to SRM. When I create a requesition which is specified for the download to the SRM it can be found in the table EPRTRANS. Then I s
-
Report export (CSV) results in page not found error
Hello, I'm having this strange error which i cannot seem to figure out. I have enabled report export through CSV in a report (report attributes). When i click the link in the report i get a page not found error (http 404). At first i thought it was a