Help modifing a simple Lua DAP query
Hello I need help with something I can't figure out.
We currently have the following LUA script ( found in the Cisco DAP examples)
This rule allows a vpn client to connect if any AV software is installed, this is fine for PC and Mac, but now have users conneting from iOS device where no AV is running and we want to allow them in our exsiting LUA script.
assert(function()
for k,v in pairs(endpoint.av) do
if (EVAL(v.exists, "EQ", "true", "string")) then
return true
end
end
return false
end)()
We'd like to modify this simple script to allow any antivirus or any iOS based device.
I need to put in an OR if (EVAL(endpoint.os.version, "EQ", "Apple Plugin", "string") then return true.
But in all honesty I don't have the skills to make it work.
Naim
Hi,
Check this :
select t2.itemcode as 'Item Code', t2.ItemName as 'Item Description',
t2.AVgPrice as 'Item Cost', t2.LstEvlPric as 'Base Price ', t0.whsname as 'Warehouse Name'
from OWHS T0
INNER JOIN OITW T1 ON T0.WhsCode = T1.WhsCode
INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
where t1.whscode = '10'
Also, please let us know what is meant by Base Price which you require in your query?
Kind Regards,
Jitin
SAP Business One Forum Team
Similar Messages
-
Help needed in building a sql query
Hello,
I am using Oracle 10g db.
I have 3 tables table1 and table2 and table3
I am writing one sql query which is like
select table1.a a1,(select distinct b from table2,table3 where table2.id=table3.id and table1.id=table2.id) b1
from table1
Now the b1 value may give more then 1 values so when i am trying to execute the query its giving me error.
What i would like to have is if it gives returns more then 1 value then add that value as a new column means if b1 gives like abc and def as values.
Then i want the sql to return like
acolvalue abc def as a single row.
Is this possible to do?
ThanksHello,
The approach which i took is i wrote a function which gives me the b values , sseparated.
Then i am building a outer query considering the max of b so i just found there are max 10 values which one row is showing.
select b11,b12,b13,,,b10
from (
select table1.a a1,func(select distinct b from table2,table3 where table2.id=table3.id and table1.id=table2.id) b1
from table1)
but now i am facing problem like the value of b1 is a,b,c
i want to use the substr and instr function to get
a as b11
b as b12
c as b13
can anyone pls help me out to write a query? i am getting b11 but other values are somehow not coming.
for b11
i used
substr(b1,1,instr(b1,',',1,1)-1)
Thanks -
Please help!!! Tuning the query
Hi,
I am using Oracle BDBXML 2.4.16. In the following, policyContainer.dbxml has around 1000 documents and productsContainer.dbxml around 10 documents. The following query is taking around 6 - 8 seconds to fetch the data of around 300 records. I have created node-element-equality-string indexes on PolicyEvent, PolicyStatus, Archived, IsLatest, ProductID and CompanyID.
I am novice on Query tuning. Can someone please help me to tune the following query. I have posted the query plan as well.
Thanks in Advance!!
Balakrishna.
Query:
query ' for $policy in collection("policyContainer.dbxml")/Policy[PolicyState/PolicyEvent=("APPLICATION","QUOTE","BINDER","POLICY","ENDORSEMENT QUOTE")]
[PolicyHeader/ProductID = (for $product in collection("productsContainer.dbxml")/Product/ProductsHeader[CompanyID=(1)] return $product/ProductID)]
[PolicyState/PolicyStatus !=("RATE","DECLINED ENDORSEMENT QUOTE","DECLINED NON-PRE ENDORSEMENT QUOTE","DECLINED EXTENSION QUOTE")]
[PolicyState/Archived !="true"]
[(PolicyState/IsLatest !="false"
and (PolicyState/PolicyStatus != ("ENDORSEMENT QUOTE","NON-PRE ENDORSEMENT QUOTE","EXTENSION QUOTE")))
or (PolicyState/IsLatest !="true"
and (PolicyState/PolicyStatus =("ENDORSEMENT QUOTE","NON-PRE ENDORSEMENT QUOTE","EXTENSION QUOTE")))]
let $state := $policy/PolicyState
let $header := $policy/PolicyHeader
let $datatable := $policy/DataTable/DataTableInfo
return
<policyDetail>
{$policy/SubmissionNumber},
{$policy/DocumentNumber},
{$policy/QuoteVersionNumber},
{$state/*,$header/*,$datatable/*}
</policyDetail>'
Query plan:
<XQuery>
<Return>
<LetTuple uri="" name="datatable">
<LetTuple uri="" name="header">
<LetTuple uri="" name="state">
<ForTuple uri="" name="policy">
<ContextTuple/>
<QueryPlanToAST>
<BufferQP id="2">
<NegativeNodePredicateFilterQP uri="" name="#tmp67">
<NegativeNodePredicateFilterQP uri="" name="#tmp73">
<NodePredicateFilterQP uri="" name="#tmp404">
<ParentOfChildJoinQP>
<StepQP axis="parent-of-child" name="PolicyState" nodeType="element">
<UnionQP>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="PolicyEvent" value="ENDORSEMENT QUOTE"/>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="PolicyEvent" value="APPLICATION"/>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="PolicyEvent" value="POLICY"/>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="PolicyEvent" value="BINDER"/>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="PolicyEvent" value="QUOTE"/>
</UnionQP>
</StepQP>
<StepQP axis="child" name="Policy" nodeType="element">
<SequentialScanQP container="policyContainer.dbxml" nodeType="document"/>
</StepQP>
</ParentOfChildJoinQP>
<ValueFilterQP comparison="eq" general="true">
<StepQP axis="child" name="ProductID" nodeType="element">
<StepQP axis="child" name="PolicyHeader" nodeType="element">
<VariableQP name="#tmp404"/>
</StepQP>
</StepQP>
<Atomize>
<Return>
<ForTuple uri="" name="product">
<ContextTuple/>
<QueryPlanToAST>
<ParentOfChildJoinQP>
<ValueFilterQP comparison="eq" general="true">
<PresenceQP container="productsContainer.dbxml" index="node-element-equality-string" operation="prefix" child="CompanyID"/>
<Sequence>
<NumericTypeConstructor value="1.0E0" typeuri="http://www.w3.org/2001/XMLSchema" typename="integer"/>
</Sequence>
</ValueFilterQP>
<StepQP axis="child" name="ProductsHeader" nodeType="element">
<StepQP axis="child" name="Product" nodeType="element">
<SequentialScanQP container="productsContainer.dbxml" nodeType="document"/>
</StepQP>
</StepQP>
</ParentOfChildJoinQP>
</QueryPlanToAST>
</ForTuple>
<QueryPlanToAST>
<StepQP axis="child" name="ProductID" nodeType="element">
<VariableQP name="product"/>
</StepQP>
</QueryPlanToAST>
</Return>
</Atomize>
</ValueFilterQP>
</NodePredicateFilterQP>
<ValueFilterQP comparison="ne" general="true">
<ValueFilterQP comparison="ne" general="true">
<ValueFilterQP comparison="ne" general="true">
<ValueFilterQP comparison="ne" general="true">
<StepQP axis="child" name="PolicyStatus" nodeType="element">
<StepQP axis="child" name="PolicyState" nodeType="element">
<VariableQP name="#tmp73"/>
</StepQP>
</StepQP>
<Sequence>
<AnyAtomicTypeConstructor value="RATE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED NON-PRE ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED EXTENSION QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ValueFilterQP>
<Sequence>
<AnyAtomicTypeConstructor value="RATE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED NON-PRE ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED EXTENSION QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ValueFilterQP>
<Sequence>
<AnyAtomicTypeConstructor value="RATE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED NON-PRE ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED EXTENSION QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ValueFilterQP>
<Sequence>
<AnyAtomicTypeConstructor value="RATE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED NON-PRE ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="DECLINED EXTENSION QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ValueFilterQP>
</NegativeNodePredicateFilterQP>
<ChildJoinQP>
<StepQP axis="child" name="PolicyState" nodeType="element">
<VariableQP name="#tmp67"/>
</StepQP>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="Archived" value="true"/>
</ChildJoinQP>
</NegativeNodePredicateFilterQP>
<UnionQP>
<NegativeNodePredicateFilterQP uri="" name="#tmp18">
<NegativeNodePredicateFilterQP uri="" name="#tmp46">
<BufferReferenceQP id="2"/>
<ChildJoinQP>
<StepQP axis="child" name="PolicyState" nodeType="element">
<VariableQP name="#tmp46"/>
</StepQP>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="IsLatest" value="false"/>
</ChildJoinQP>
</NegativeNodePredicateFilterQP>
<ValueFilterQP comparison="ne" general="true">
<ValueFilterQP comparison="ne" general="true">
<ValueFilterQP comparison="ne" general="true">
<StepQP axis="child" name="PolicyStatus" nodeType="element">
<StepQP axis="child" name="PolicyState" nodeType="element">
<VariableQP name="#tmp18"/>
</StepQP>
</StepQP>
<Sequence>
<AnyAtomicTypeConstructor value="ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="NON-PRE ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="EXTENSION QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ValueFilterQP>
<Sequence>
<AnyAtomicTypeConstructor value="ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="NON-PRE ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="EXTENSION QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ValueFilterQP>
<Sequence>
<AnyAtomicTypeConstructor value="ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="NON-PRE ENDORSEMENT QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
<AnyAtomicTypeConstructor value="EXTENSION QUOTE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ValueFilterQP>
</NegativeNodePredicateFilterQP>
<NegativeNodePredicateFilterQP uri="" name="#tmp56">
<ParentOfChildJoinQP>
<StepQP axis="parent-of-child" name="PolicyState" nodeType="element">
<UnionQP>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="PolicyStatus" value="NON-PRE ENDORSEMENT QUOTE"/>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="PolicyStatus" value="EXTENSION QUOTE"/>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="PolicyStatus" value="ENDORSEMENT QUOTE"/>
</UnionQP>
</StepQP>
<BufferReferenceQP id="2"/>
</ParentOfChildJoinQP>
<ChildJoinQP>
<StepQP axis="child" name="PolicyState" nodeType="element">
<VariableQP name="#tmp56"/>
</StepQP>
<ValueQP container="policyContainer.dbxml" index="node-element-equality-string" operation="eq" child="IsLatest" value="true"/>
</ChildJoinQP>
</NegativeNodePredicateFilterQP>
</UnionQP>
</BufferQP>
</QueryPlanToAST>
</ForTuple>
<QueryPlanToAST>
<StepQP axis="child" name="PolicyState" nodeType="element">
<VariableQP name="policy"/>
</StepQP>
</QueryPlanToAST>
</LetTuple>
<QueryPlanToAST>
<StepQP axis="child" name="PolicyHeader" nodeType="element">
<VariableQP name="policy"/>
</StepQP>
</QueryPlanToAST>
</LetTuple>
<QueryPlanToAST>
<StepQP axis="child" name="DataTableInfo" nodeType="element">
<StepQP axis="child" name="DataTable" nodeType="element">
<VariableQP name="policy"/>
</StepQP>
</StepQP>
</QueryPlanToAST>
</LetTuple>
<DOMConstructor type="element">
<Name>
<Sequence>
<ATQNameConstructor uri="" prefix="" localname="policyDetail" typeuri="http://www.w3.org/2001/XMLSchema" typename="QName"/>
</Sequence>
</Name>
<Children>
<ContentSequence>
<QueryPlanToAST>
<StepQP axis="child" name="SubmissionNumber" nodeType="element">
<VariableQP name="policy"/>
</StepQP>
</QueryPlanToAST>
</ContentSequence>
<ContentSequence>
<Sequence>
<AnyAtomicTypeConstructor value="," typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ContentSequence>
<ContentSequence>
<QueryPlanToAST>
<StepQP axis="child" name="DocumentNumber" nodeType="element">
<VariableQP name="policy"/>
</StepQP>
</QueryPlanToAST>
</ContentSequence>
<ContentSequence>
<Sequence>
<AnyAtomicTypeConstructor value="," typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ContentSequence>
<ContentSequence>
<QueryPlanToAST>
<StepQP axis="child" name="QuoteVersionNumber" nodeType="element">
<VariableQP name="policy"/>
</StepQP>
</QueryPlanToAST>
</ContentSequence>
<ContentSequence>
<Sequence>
<AnyAtomicTypeConstructor value="," typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
</Sequence>
</ContentSequence>
<ContentSequence>
<Parenthesized>
<QueryPlanToAST>
<ChildJoinQP>
<VariableQP name="state"/>
<SequentialScanQP container="policyContainer.dbxml" nodeType="element"/>
</ChildJoinQP>
</QueryPlanToAST>
<QueryPlanToAST>
<StepQP axis="child" uri="*" name="*" nodeType="element">
<VariableQP name="header"/>
</StepQP>
</QueryPlanToAST>
<QueryPlanToAST>
<ChildJoinQP>
<VariableQP name="datatable"/>
<SequentialScanQP container="policyContainer.dbxml" nodeType="element"/>
</ChildJoinQP>
</QueryPlanToAST>
</Parenthesized>
</ContentSequence>
</Children>
</DOMConstructor>
</Return>
</XQuery>The good news is that your indexes are being used (anywhere in the query plan where you see index="node-element-equality-string"), the bad news is that the entire policyContainer is being scanned several times (<SequentialScanQP container="policyContainer.dbxml" nodeType="element"/>). Your best bet is to upgrade to dbxml-2.5.16, since that has several improvements to the optimizer that should optimize away those scans. Failing that, use the shell command (dbxml) to add and remove indexes and see how that changes the query plan and speed. The following line is what is causing the scans:
{$state/*,$header/*,$datatable/*}So add indexes that will help to locate those nodes, or change that line so that the query is faster.
Lauren Foutz -
Help with a simple program.
I need some help writing a simple program. Can anybody help??
thanks to all.
2. HTML Java Source Code Reserved Word Highlighter
Write a program that inputs a Java source code file and outputs a copy of that file with Java keywords surrounded with HTML tags for bold type. For example this input:
public class JavaSource
public static void main ( String[] args )
if ( args.length == 3 )
new BigObject();
else
System.out.println("Too few arguments.");
will be transformed into:
<B>public</B> <B>class</B> JavaSource
<B>public</B> <B>static</B> <B>void</B> main ( String[] args )
<B>if</B> ( args.length == 3 )
<B>new</B> BigObject();
<B>else</B>
System.out.println("Too few arguments.");
In a browser the code will look like this:
public class JavaSource
public static void main ( String[] args )
if ( args.length == 3 )
new BigObject();
else
System.out.println("Too few arguments.");Here is something that may get you started...
import java.io.*;
import java.util.*;
public class HtmlJava{
public static void main(String arg[]){
if(arg.length!=1){
System.out.println("Usage java HtmlJava sourceFile");
else
new HtmlJava(arg[0]);
HtmlJava(String source){
try{
BufferedReader sourceReader=new BufferedReader(new InputStreamReader(new FileInputStream(source)));
BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(source+"Html.txt")));
Vector keywords=new Vector();
addKeywords(keywords);
String line;
StringTokenizer tokenizer=null;
String word;
while((line=sourceReader.readLine () )!=null){
tokenizer=new StringTokenizer(line);
while(tokenizer.hasMoreTokens()){
word=tokenizer.nextToken();
if(keywords.contains(word)){
writer.write(""+word+" ");
else{
writer.write(word+" ");
writer.write("\r\n");
writer.close();
sourceReader.close();
System.out.println("Output File written to "+source+"Html.txt");
catch(Exception ex){
ex.printStackTrace();
private void addKeywords(Vector keywords){
keywords.addElement ( "abstract");
keywords.addElement( "boolean");
keywords.addElement( "break");
keywords.addElement( "byte");
keywords.addElement( "byvalue");
keywords.addElement( "case");
keywords.addElement( "cast");
keywords.addElement( "catch");
keywords.addElement( "char");
keywords.addElement( "class");
keywords.addElement( "const");
keywords.addElement( "continue");
keywords.addElement( "default");
keywords.addElement( "do");
keywords.addElement( "double");
keywords.addElement( "else");
keywords.addElement( "extends");
keywords.addElement( "false");
keywords.addElement( "final");
keywords.addElement( "finally");
keywords.addElement( "float");
keywords.addElement( "for");
keywords.addElement( "future");
keywords.addElement( "generic");
keywords.addElement( "goto");
keywords.addElement( "if");
keywords.addElement( "implements");
keywords.addElement( "import");
keywords.addElement( "inner");
keywords.addElement( "instanceof");
keywords.addElement( "int");
keywords.addElement( "interface");
keywords.addElement( "long");
keywords.addElement( "native");
keywords.addElement( "new");
keywords.addElement( "null");
keywords.addElement( "operator");
keywords.addElement( "outer");
keywords.addElement( "package");
keywords.addElement( "private");
keywords.addElement( "protected");
keywords.addElement( "public");
keywords.addElement( "rest");
keywords.addElement( "return");
keywords.addElement( "short");
keywords.addElement( "static");
keywords.addElement( "super");
keywords.addElement( "switch");
keywords.addElement( "synchronized");
keywords.addElement( "this");
keywords.addElement( "throw");
keywords.addElement( "throws");
keywords.addElement( "transient");
keywords.addElement( "true");
keywords.addElement( "try");
keywords.addElement( "var");
keywords.addElement( "void");
keywords.addElement( "volatile");
keywords.addElement( "while");
}Hope it helped -
pls i need help for this simple problem of my palm os zire 72. pls share your ideas with me.... i tried to connect my palm os zire72 in my desktop computer using my usb cable but i can't see it in my computer.. my palm has no problem and it works well. the only problem is that, my desktop computer can't find my palm when i tried to connect it using usb cable. is thier any certain driver or installer needed for it so that i can view my files in my palm using the computer. where i can download its driver? is there somebody can help me for this problem? just email me pls at [email protected] i really accept any suggestions for this problem. thanks for your help...
If you are using Windows Vista go to All Programs/Palm and click on the folder and select Hot Sync Manager and then try to sync with the USB cable. If you are using the Windows XP go to Start/Programs/Palm/Hot Sync Manager and then try to sync. If you don’t have the palm folder at all on your PC you have to install it. Here is the link http://kb.palm.com/wps/portal/kb/common/article/33219_en.html that version 4.2.1 will be working for your device Zire 72.
-
Hi ,
I'm running the following simple query in sql*plus on ORACLE9i. But this query stopped running after 30minutes, and the sql*plus die at the same time .I have no idea about this. Could somebody tell me how I can solve this problem. Thank you very much for your help.
Select Distinct PERSADDRUSE. ADDRUSECD as "Application", PERS.PERSNBR as "Account",
(PERS.FIRSTNAME || ' '|| PERS.MDLINIT ||' ' || PERS.LASTNAME ) as "Name1",' 'as "Name2",' 'as "Name3",
AL1.TEXT as "Address1",AL2.TEXT as "Address2",AL3.TEXT as "Address3",
(ADDR.CITYNAME ||' ' || ' '||ADDR.STATECD ||' '||ADDR.ZIPCD||' '|| ADDR.ZIPSUF) as "CityStateZip"
From PERSADDRUSE
Join PERS
ON PERS.PERSNBR = PERSADDRUSE.PERSNBR
--AND PERS.ADDDATE = '12-JAN-2005'
AND PERSADDRUSE.ADDRUSECD = 'PRI'
join ADDR
ON PERSADDRUSE.ADDRNBR = ADDR.ADDRNBR
left JOIN ADDRLINE AL1
ON ADDR.ADDRNBR = AL1.ADDRNBR
AND AL1.LINENBR = 1
left JOIN ADDRLINE AL2
ON ADDR.ADDRNBR = AL2.ADDRNBR
AND AL2.LINENBR = 2
left JOIN ADDRLINE AL3
ON ADDR.ADDRNBR = AL3.ADDRNBR
AND AL3.LINENBR = 3;Thanks for reply. I have some other query running for 45m and it seems fine. The following are the explain plan I print out. I'm new to PL/SQL.Could you guys give me some other ideas?
BMS_XPLAN.DISPLAY()(PLAN_TABLE_OUTPUT)
PERSADDRUSE | 5726 | 68712 | 183 |'), DBMS_XPLAN_TYPE('| 8 | TABLE ACCESS FULL| PERS | 161K| 2839K| 431 |'), DBMS_XPLAN_TYPE('| 9 | TABLE ACCESS FULL | ADDR | 239K| 5145K| 298 |'), DBMS_XPLAN_TYPE('| 10 | TABLE ACCESS FULL | ADDRLINE | 82087 | 1683K| 240 |'), DBMS_XPLAN_TYPE('| 11 | TABLE ACCESS FULL | ADDRLINE | 82087 | 1683K| 240 |'), DBMS_XPLAN_TYPE('| 12 | TABLE ACCESS FULL | ADDRLINE | 82087 | 1683K| 240 |'), DBMS_XPLAN_TYPE('------------------------------------------------------------------------'), DBMS_XPLAN_TYPE(' '), DBMS_XPLAN_TYPE('Note: cpu costing is off, PLAN_TABLE'' is old version')) -
Help with a simple XMLTable query
Newbie Oracle XML developer here and need a little guidance on how to retrieve multiple records in an xmltype table using xmltable.
My document in the xmltype table looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<echoems:ECHOMetrics xmlns:echoems="http://myURL/myFilename.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://myURL/myFilename.xsd
http://myURL/myFilename.xsd">
<OrderMetrics>
<OrderItemMetric>
<requestor>user1</requestor>
<product>123</product>
</OrderItemMetric>
<OrderItemMetric>
<requestor>0.0.0.0</requestor>
<product>ABC</product>
</OrderItemMetric>
<OrderItemMetric>
<requestor>user3</requestor>
<product>XYZ</product>
</OrderItemMetric>
</OrderMetrics>
</echoems:ECHOMetrics>
I want to get all the products:
Product
123
ABC
XYZ
I know to use XMLTable but am not sure how exactly to write it. If just one record, the following worked fine:
select extractvalue
(object_value,
'echoems:ECHOMetrics/OrderMetrics/OrderItemMetric/product',
'xmlns:echoems="http://myURL/myFilename.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
) object_value
from echoXML;
But with multiple records, I'm trying XMLTable but can't get it right. Trying something like this:
select m.product
from echoXML3
xmlTable(
(object_value,'echoems:ECHOMetrics/OrderMetrics/OrderItemMetric/*','xmlns:echoems="http://myURL/myFilename.xsd')
passing object_value
COLUMNS
product varchar2(85) path 'product') m;
Thanks in advance for any help on this.One more question. Instead of putting the xml doc in the query, how do I reference it from the xmlType table?
You have:
select *
from xmltable
'//OrderMetrics/OrderItemMetric'
passing xmltype(
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<echoems:ECHOMetrics xmlns:echoems="http://myURL/myFilename.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://myURL/myFilename.xsd">
<OrderMetrics>
<OrderItemMetric>
<requestor>user1</requestor>
<product>123</product>
</OrderItemMetric>
<OrderItemMetric>
<requestor>0.0.0.0</requestor>
<product>ABC</product>
</OrderItemMetric>
<OrderItemMetric>
<requestor>user3</requestor>
<product>XYZ</product>
</OrderItemMetric>
</OrderMetrics>
</echoems:ECHOMetrics>')
columns
prod varchar2(20) path 'product',
requestor varchar(50) path 'requestor'
However, the xmlDocument is already in an xmlType table called echoXML3 based on the xsd. I'm just trying to query it to get a relational result set. How, in the query above, do I replace the hardcoded xmlDoc with the xmlDoc located in my xmlType table?
I thought maybe something like this but it's not working:
select *
from xmltable
'//OrderMetrics/OrderItemMetric'
passing xmltype(select value(e)
from echoXML3,
TABLE(xmlsequence(extract(object_value,'echoems:ECHOMetrics/OrderMetrics/OrderItemMetric/*','xmlns:echoems="http://myURL/myFilename.xsd'))) e)
columns
prod varchar2(20) path 'product',
requestor varchar(50) path 'requestor'
Message was edited by:
user619814 -
Help Reqd - on simple sql query
Hi,
I have two tables back_temp_ord_hist, temp_ord_hist of similar structures
create table <table_name>
order_number varchar2(10),
item_number integer,
sched_line_number integer,
dlv_doc_id varchar2(10),
mtrl_mstr_key integer,
cust_key integer,
wrhse_key integer,
sls_ord_type varchar2(4)
Now I have inserted same data set in the two tables. (same following three rows in both the tables)
0009032022 160 2 0091383073 27219 1694 20 ZISO
0009032022 160 3 0091383073 27219 1694 20 ZISO
0009032022 160 4 0091383073 27219 1694 20 ZISO
Then I am trying to use a query like below :
select
fact.order_number
, fact.item_number
, fact.sched_line_number
, bk_fact.sched_line_number as old_sched_line_number
, fact.dlv_doc_id
,dbms_utility.get_hash_value(fact.order_number||fact.item_number||fact.sched_line_number||fact.dlv_doc_id,1,100) ord_hist_hash
,dbms_utility.get_hash_value(bk_fact.order_number||bk_fact.item_number||bk_fact.sched_line_number||bk_fact.dlv_doc_id,1,100) back_ord_hist_hash
, fact.mtrl_mstr_key
, bk_fact.mtrl_mstr_key as old_mtrl_mstr_key
, fact.cust_key
, bk_fact.cust_key as old_cust_key
, fact.wrhse_key
, bk_fact.wrhse_key as old_wrhse_key
, fact.sls_ord_type
, bk_fact.sls_ord_type as old_sls_ord_type
from
temp_ord_hist fact
join
back_temp_ord_hist bk_fact
on fact.order_number = bk_fact.order_number
and fact.item_number = bk_fact.item_number
and fact.sched_line_number <> bk_fact.sched_line_number
and fact.dlv_doc_id = bk_fact.dlv_doc_id
order by ord_hist_hash, back_ord_hist_hash
But it is actually it is showing 6 rows. But ideally I want no rows as temp_ord_hist.sched_line_number = back_temp_ord_hist.sched_line_number in all the cases over here.
Practically it can be different then I want those rows but when it is same why the output is showing 6 rows.
What I am doing wrong over here?
Regards,
KoushikNot sure how you are getting 6 rows as the output. I did exactly the same thing that you did and I am getting the only 3 rows as the output:
see below:
SQL> create table temp_ord_hist
2 (
3 order_number varchar2(10),
4 item_number integer,
5 sched_line_number integer,
6 dlv_doc_id varchar2(10),
7 mtrl_mstr_key integer,
8 cust_key integer,
9 wrhse_key integer,
10 sls_ord_type varchar2(4)
11 );
Table created.
SQL> create table back_temp_ord_hist
2 (
3 order_number varchar2(10),
4 item_number integer,
5 sched_line_number integer,
6 dlv_doc_id varchar2(10),
7 mtrl_mstr_key integer,
8 cust_key integer,
9 wrhse_key integer,
10 sls_ord_type varchar2(4)
11 );
Table created.
SQL> insert into temp_ord_hist values ('0009032022',160,2,'0091383073',27219,1694,20,'ZISO');
1 row created.
SQL> insert into temp_ord_hist values ('0009032022',160,3,'0091383073',27219,1694,20,'ZISO');
1 row created.
SQL>
SQL> insert into temp_ord_hist values ('0009032022',160,4,'0091383073',27219,1694,20,'ZISO');
1 row created.
SQL> insert into back_temp_ord_hist values ('0009032022',160,2,'0091383073',27219,1694,20,'ZISO');
1 row created.
SQL> insert into back_temp_ord_hist values ('0009032022',160,3,'0091383073',27219,1694,20,'ZISO');
1 row created.
SQL> insert into back_temp_ord_hist values ('0009032022',160,4,'0091383073',27219,1694,20,'ZISO');
1 row created.
SQL> select
2 fact.order_number
3 , fact.item_number
4 , fact.sched_line_number
5 , bk_fact.sched_line_number as old_sched_line_number
6 , fact.dlv_doc_id
7 ,dbms_utility.get_hash_value(fact.order_number||fact.item_number||fact.sched_line_number||fact.dlv_doc_id,1,100) ord_hist_hash
8 ,dbms_utility.get_hash_value(bk_fact.order_number||bk_fact.item_number||bk_fact.sched_line_number||bk_fact.dlv_doc_id,1,100) back_ord_hist_hash
9 , fact.mtrl_mstr_key
10 , bk_fact.mtrl_mstr_key as old_mtrl_mstr_key
11 , fact.cust_key
12 , bk_fact.cust_key as old_cust_key
13 , fact.wrhse_key
14 , bk_fact.wrhse_key as old_wrhse_key
15 , fact.sls_ord_type
16 , bk_fact.sls_ord_type as old_sls_ord_type
17 from
18 temp_ord_hist fact
19 join
20 back_temp_ord_hist bk_fact
21 on fact.order_number = bk_fact.order_number
22 and fact.item_number = bk_fact.item_number
23 and fact.sched_line_number = bk_fact.sched_line_number
24 and fact.dlv_doc_id = bk_fact.dlv_doc_id
25 order by ord_hist_hash, back_ord_hist_hash
26
SQL> /
0009032022 160 3 3 0091383073 4 4 27219 27219 1694 1694 20 20 ZISO ZISO
0009032022 160 4 4 0091383073 55 55 27219 27219 1694 1694 20 20 ZISO ZISO
0009032022 160 2 2 0091383073 100 100 27219 27219 1694 1694 20 20 ZISO ZISO
SQL> -
Help required for a Remote cube query
Hi,
We are working on Remote cube, which has a source from a view built on R/3 base table. I need to extract the data to BW based on a current date due to huge volume of data(performance reasons) in the table. I have used an exit on R/3 to restrict to current date but the extract checker was showing the valid data ie only for current date. When i had built a query on Remote cube, the Report was showing complete data(restriction not working). We have even tried using an inversion routine in transfer rules to pass the selections to the Source system even then it doesn't work. Could you help if you have come across same kind of situation or you can suggest an alternate solution on the same but we have to use Remote cube.
Any suggestions asap would be highly appreciated and rewarded with full points.
Regards,
RajI can think of two ways to do it
Simple with no ABAP coding is a view
Create a view between a timestamp table and your big table
Put an entry into your timestamp table of the current date - then use a selection of this inside the view
Unforutunately you cannot use SY fields inside database views (otherwise you could have used these as a selection condition in the view)
The best way to do it is using a function module and passing the data from the query into the SQL statement
I prefer to do it the last way and also pass data through a generic structure - thus you manipulate the data inside the intial loop in the function module and don;t utilise further loops downstream in transfer rules
(to try and keep the reponse time down) -
Need Help with instr/Regexp for the query
Hi Oracle Folks
I am using Oracle
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
I have some student responses and the valid values are +/-/O(alphabet)/P and spaces at the end of the sting only not in the middle.
As per my requirement the record number 2 3,4 should be listed from the query but I am getting only one (record 3).
Can we use REG_EXP
Please help.
Thanks in advance.
Rajesh
with x as (
SELECT '+-+-POPPPPPP ' STUDENT_RESPONSE, 1 record_number FROM DUAL union all
SELECT '+--AOPPPPPP++' STUDENT_RESPONSE, 2 record_number FROM DUAL union all
SELECT '+-+- OPPPPPP--' STUDENT_RESPONSE, 3 record_number FROM DUAL union all
SELECT '+-+-9OPPPPPP ' STUDENT_RESPONSE, 4 record_number FROM DUAL )
(SELECT RECORD_NUMBER,
TRIM(STUDENT_RESPONSE) FROM X
WHERE
((INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'-') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'+') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'O') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'P') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),' ') !=0)
)Hi, Rajesh,
Rb2000rb65 wrote:
Hi Oracle Folks
I am using Oracle
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsThanks for posting this (and the WITH clause for the sample data). That's very helpful.
I have some student responses and the valid values are +/-/O(alphabet)/P and spaces at the end of the sting only not in the middle.Are you combining the responses to several qeustions in one VARCHAR2 column? It might be better to have a separate row for each question.
As per my requirement the record number 2 3,4 should be listed from the query but I am getting only one (record 3). What exactly is your requirement? Are you trying to find the rows where student_response contains any of the forbidden characters, or where it contains a space anywhere but at the end of the string?
Can we use REG_EXPYes, but it's easy enough, and probably more efficient, to not use regular expressions in this case:
Here's one way:
SELECT record_number
, student_response
FROM x
WHERE TRANSLATE ( UPPER ( RTRIM (student_response, ' '))
, 'X+-OP'
, 'X'
) IS NOT NULL
;That is, once you remove trailing spaces and all occurrences of '+', '-', 'O' or 'P', then only the forbidden characters are left, and you want to select the row if there are any of those.
If you really, really want to use a regular expression:
SELECT record_number
, student_response
FROM x
WHERE REGEXP_LIKE ( RTRIM (student_response)
, '[^-+OP]' -- or '[^+OP-]', but not '[^+-OP]'. Discuss amongst yourselves
, 'i'
;but, I repeat, this will probably be slower than the first solution, using TRANSLATE.
Edited by: Frank Kulash on Oct 17, 2011 1:05 PM
Edited by: Frank Kulash on Oct 17, 2011 1:41 PM
The following is slightly simpler than TRANSLATE:
SELECT record_number
, student_response
FROM x
WHERE RTRIM ( UPPER ( RTRIM (student_response, ' '))
, '+-OP'
) IS NOT NULL
; -
Hi, I have a table with data very similar to the following....
NAME DATE
ann 05-NOV-07
tim 03-JUL-07
tim 14-DEC-07
tim 22-JUN-07
ann 15-MAY-07
Any ideas how to return the name and date of the person with the most recent date?
In this example the query would return 2 rows (one for tim and one for ann).
Thanks for any assistance!Its more that this is a very simple question to ask on a forum like this.
Reference the comments on Juststarters heavily responded post from earlier today.
Comments on the way people express themselves
In general users usually expect some evidence that you have tried to find out what the answer / solution is before posting. Not saying that you are lazy but it gives the impression and feeling that we're genuinly helping someone as opposed to just telling someone who is too lazy to find out the answer themselves. -
Simple UI to Query Coherence cache ?
Hello to all Coherence Experts,
My name is Goverdhan and I work for RBS. I am glad to be a part of this very active and informative forum. I had one question - do we have a query tool to query the coherence cache ? I mean - rather writing Java program for every query, do you know of any graphical user interface that would help in writing query and seeing result ? Like Toad, for example. It need not be as jazzy as toad - but, the idea is to have a simple UI and avoid writing Java program for every query. Any quick pointers in this direction is deeply appreciated.
Please advise. We are urgently looking for a tool. Even if it is paid tool - please let me know. My email ids are :
[email protected]
[email protected]
Thanks,
GoverdhanHi Goverdhan,
SL Corp. are creating a Coherence Cache Viewer and Display Builder tool, which may be useful to you.
You can send a mail to [email protected] to find out more about it.
Best regards,
Robert -
Hi,
This might be a simple question, I am new to Pl/SQL ,
I have a table which consists of two columns deal_id and freq.
for each deal_id there might be number of freq. The table something looks similar ltoo this,
deal_id freq
10 1.1
10 1.2
12 1.1
12 1.2
14 1.1
14 1.2
14 1.3
16 1.5
16 1.5
Now if a deal_id selected has freq 1.1 and 1.2 , it should display output has 'MA only'
if a deal_id selected has freq other than 1.1 and 1.2 , it should display 'Not MA'
else if it has like deal_id 14 should display . 'Both Ma and Non MA'
I wrote a query like this,
select
deal_id
, case
When Freq In (1.1 , 1.2) Then 'MA Only'
When Freq Not in (1.1 , 1.2) Then 'Non-MA Only'
Else 'Both Ma and Non-Ma'
End freq_dt
from sample_Table
where ia.deal_id= '14'
O/P i get is
deal_id freq_dt
14 MA only
14 MA only
14 Non MA only
But i should get O/p like
deal_id freq_dt
14 Both MA and Non Ma
Any help will be greatlt appreciated.
Thanks,
VinThanks Guys, for all your valuable suggestions.
These forums are helping me a lot.
Ok, back to the question, after going thru all the posts, i worked out on the query at work for a while and edited it something like this,
Select
case
when count(distinct freq_dt)>1 Then 'Both MA and Non-MA only'
Else <......>(pl refer below)
end status
from
(select
ia.deal_id
, case
when Freq In (851.0125, 851.5125, 852.0125, 852.5125, 853.0215) Then 'MA Only'
When Freq Not in (851.0125, 851.5125, 852.0125, 852.5125, 853.0215) Then 'Non-MA Only'
Else 'Both Ma and Non-Ma'
End freq_dt
from repl_site_freq ia
where ia.deal_id='65'
No worries, I know the query looks like useless, but I am working, I am new to Oracle,
and what i have done is performed a distinct count on the subquery.
Now if count >1 , i mean there is MA and Non-MA so it displays both MA and Non MA. Its working fine.
But now if count = 1, i mean if the whole subquery table has either MA or NOn-MA , then how can i catch that .
I mean if count =1, O/p shud be MA only if all are MA
and NON-MA if all are Non-MA.
Now I want to put this query in the else statement above
select st from
select
ia.deal_id
, case
when Freq In (851.0125, 851.5125, 852.0125, 852.5125, 853.0215) Then 'MA Only'
When Freq Not in (851.0125, 851.5125, 852.0125, 852.5125, 853.0215) Then 'Non-MA Only'
Else 'Both Ma and Non-Ma'
End st
from repl_site_freq ia
where ia.deal_id='32434'
A where rownum < 2
since this subquery just returns count=1, and i want to display the first item in first row of first column which can be either MA or NOn-MA
when i put the above quesry in else, it returns me some error, like groupby missing.
ANy help will be greatly appreciated.
Thanks,
Vin -
I need help some with simple ejb3 app - urgent
I�m trying to write a small app using ejb3 and I have a big problem.
1. I created a Session bean in ejb module
package beans;
import javax.ejb.*;
@Stateless()
public class testBean implements beans.testLocal {
public String test(String name)
return "hello "+name;
package beans;
public interface testLocal {
String test(String name);
}2. In web module I created a servlet and as in the 'Ejb3 Persistence in netbeans tutorial" and then I called my session bean (http://www.netbeans.org/kb/55/ejb3-preview.html#Exercise_2)
protected void processRequest(...)
...out.println("<body>");
out.println(aTestBean.test("a Test")); //bean method call
out.println("</body>");
out.println("</html>");
out.close();
@EJB
beans.testBean aTestBean; //reference to the session beanI compiled and deployed it.
And after I invoked the servlet I got that message :
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet test threw exception
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:664)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:571)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:846)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:345)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:237)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:240)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
root cause
java.lang.RuntimeException: WEB5002: Exception in handleBeforeEvent.
com.sun.web.server.J2EEInstanceListener.handleBeforeEvent(J2EEInstanceListener.java:205)
com.sun.web.server.J2EEInstanceListener.instanceEvent(J2EEInstanceListener.java:90)
org.apache.catalina.util.InstanceSupport.fireInstanceEvent(InstanceSupport.java:250)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:664)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:571)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:846)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:345)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:237)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:240)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
I also tried to do it like in the flash ejb3 presentation but I got the same result (http://j2ee.netbeans.org/NetBeans_EJB3.html)
beans.testBean aTestBean; //reference to the session bean
@javax.ejb.EJB
private void setTestBean(beans.testBean aTestBean)
this.aTestBean = aTestBean;
}How can I call methods from session beans.
I'd like to do something like this.
1.Create an EntityBean for my database.
2 Create a session bean to manage those EntityBeans � like in the tutorial
3.Create a web module and a servlet with method calls from that session bean
4. Create a MIDP 2.0 app using "Mobile client to web app' wizard from the mobility pack, to generate stubs for servlet methods.
All I need to create one simple method
public String getDataFromDB(int ID)
//and here the call to the session bean
return sesionbeanReference.getData(ID);
help meHi
I am Facing th same Problem ,But the solution you have give
that use Local Interface intead of Bean
In my case I am using Remote Interface and not the local its giving me the same problems as the Query Posted
javax.servlet.ServletException: Servlet.init() for servlet NewServlet threw exception
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:664)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:571)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:846)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:345)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:237)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:240)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
root cause
java.lang.RuntimeException: WEB5002: Exception in handleBeforeEvent.
com.sun.web.server.J2EEInstanceListener.handleBeforeEvent(J2EEInstanceListener.java:205)
com.sun.web.server.J2EEInstanceListener.instanceEvent(J2EEInstanceListener.java:90)
org.apache.catalina.util.InstanceSupport.fireInstanceEvent(InstanceSupport.java:250)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:664)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:571)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:846)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:345)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:237)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:240)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
note The full stack trace of the root cause is available in the Sun Java System Application Server Platform Edition 9.0 Beta logs.
My EJB Refernce to rmote interface looks like this
@EJB ProcessAdvertisementRemote oProcessAdvertisementRemote;
I am caaling a method on that inferface ,so its giving these exceptions
Can u plz help me out
Geetanjalee -
Help creating a simple function testing conditions in 2 columns
I want to create a simple function which tests if a value is found in one of two columns:
If MyValue is in columnA or ColumnB then True ELSE False
Any ideas?Ok, This is the deal. This has been kicking my butt all day. So here is the exact table names and view names and all the columns involved.
The table I am inserting into only after I determine that the concatenated string is not there either "forward" or "backwards."
RPT_DS1_ALOC_ZLOC_REVERSE_VW:
ALOC VARCHAR2(8) Data looks like 'AFD32GD2'
ZLOC VARCHAR2(8) Data looks like 'AFD55GDF'
MASTER_ROUTE_NAME VARCHAR(17) Data looks like 'AFD32GD2-AFD55GDF'
REVERSED VARCHAR(17) Data looks like 'AFD55GDF-AFD32GD2'
This view is built off another table that has only the ALOC and ZLOCsSELECT * FROM RPT_DS1_ALOC_ZLOC_REVERSE_VW WHERE ROWNUM <=5;
MASTER_ROUTE_NAME REVERSED ALOC ZLOC
ABDLFLXA-ABDLFLXA ABDLFLXA-ABDLFLXA ABDLFLXA ABDLFLXA
AGSTGAAU-AGSTGAAU AGSTGAAU-AGSTGAAU AGSTGAAU AGSTGAAU
AGSTGAFL-AGSTGAFL AGSTGAFL-AGSTGAFL AGSTGAFL AGSTGAFL
AGSTGAMT-AGSTGAAU AGSTGAAU-AGSTGAMT AGSTGAMT AGSTGAAU
AGSTGAMT-AGSTGAFL AGSTGAFL-AGSTGAMT AGSTGAMT AGSTGAFL
RATE_MASTER_ROUTE:
MASTER_ROUTE_NAME VARCHAR2(17) Data looks like 'AFD32GDS-AFD55GDF' or 'AFD55GDF-AFD32GDS'
ALOC VARCHAR2(8) Data looks like 'AFD32GD2'
ZLOC VARCHAR2(8) Data looks like 'AFD55GDF'SELECT * FROM RATE_MASTER_ROUTE WHERE ROWNUM <=5;
MASTER_ROUTE_NAME ALOC ZLOC
ABDLFLXA-ABDLFLXA ABDLFLXA ABDLFLXA
AGSTGAAU-AGSTGAAU AGSTGAAU AGSTGAAU
AGSTGAFL-AGSTGAFL AGSTGAFL AGSTGAFL
AGSTGAMT-AGSTGAAU AGSTGAMT AGSTGAAU
AGSTGAMT-AGSTGAFL AGSTGAMT AGSTGAFThe idea is to insert a record into RATE_MASTER_ROUTE ONLY if it is not in there already. So since the view takes care of the reversing, all I am doing is passing in the MASTER_ROUTE_NAME and the REVERSED to see if either of them are in RATE_MASTER_ROUTE. If not, then I am INSERTING both the ALOC and ZLOC and the MASTER_ROUTE_NAME into RATE_MASTER_ROUTE. I appreciate the help so far, but I am still missing something. I have tried a number of variations. I added a dummy record to the first table that I knew was not in the second. I tried selecting it according to a similar query that was made above. But I am not communicating something correctly so this is the detail. I hope somebody can help me over this brain freeze.
Maybe you are looking for
-
Help bootcamp windows 8.1 Macbook Air 2013
I have a Macbook Air 2013 running Mavericks and I want to install windows 8.1 on it but first im getting a message saying that the iso is not 64-bit and im so confused because it partitoned my harddrive aswell so how do i get that back.
-
Version control and Approval service for folder of File Server
Hi, We have recently integrated Windows file server to portal using webDav connector. I am unable to use the services (approval and versioning) for this new repository. How to enable the services for this repository? KM content stored in PCD is havin
-
Please if any one can help be grateful
-
Photoshop CS3 Layer Style Issue
I have Photoshop CS3. Ever since I installed it I have had an issue with Layer Styles, one that I have not had before with other versions of Photoshop. Whenever I apply a Layer Style to a layer the Effects menu automatically drops down in the layers
-
in my machine ,i have j2sdk1.4.1_01 version jdk.when i am using any util classes in my program ,those doesnt compile.it gives the error regarding to java.util classes. can u help me.....?pls...... ,how to solve this problem? i am eagerly waiting for