Extrating XML whilst using group by: ORA-22806
Hi,
Can anyone tell me why this works:
select media_id, count(*) from (
select m.media_id, m.mediadata.extract('//med:caption/text()|//med:title/text()').getStringVal() AS title_caption
from media m
where m.media_id = 3208
group by media_id;
and this works:
select title_caption
from (
select m.mediadata.extract('//med:caption/text()|//med:title/text()').getStringVal() AS title_caption
from media m
where m.media_id = 3208
but this doesnt?
select title_caption, count(*) from (
select m.media_id, m.mediadata.extract('//med:caption/text()|//med:title/text()').getStringVal() AS title_caption
from media m
where m.media_id = 3208
group by title_caption;
select title_caption, count(*) from (
ERROR at line 1:
ORA-22806: not an object or REF
mediadata is a column of type xmltype and media_id is a number.
Thanks in advance.
I haven't fixed this problem but I've found a workaround, creating a view that performs the extract. The view then contains a varchar2 which can be grouped by.
Similar Messages
-
ORA-00907: missing right parenthesis when using group by clause with xmlagg
I have the following query and I am getting ORA 00907 Error when I am using group by clause with the xmlagg function.
select xmlelement("Mitigation",
xmlelement("m_szMethodName",tm.DisplayName),
xmlelement("SubstanceInterferenceProtocolList",
(select xmlagg(xmlelement("MitigationProtocol",
xmlelement("m_szMethodName",tm.DisplayName),
xmlelement("m_szInterferenceProtocolName",tmp.protocol_name),
xmlelement("m_szInterferenceSubstance",tmp.intf_mtrl_prod_code),
xmlelement("m_ProtocolParameters",
xmlelement("m_szProtocolName",tmp.protocol_name),
xmlelement("m_Consumables",
xmlelement("Consumable",
xmlelement("m_szConsumId", xrl.rgnt_pack_name),
xmlelement("m_szProductCode",xrl.pack_prod_code),
xmlelement("m_nVolume",tmp.fluid_vol),
xmlelement("m_szProtocolStep",xps.protocol_step_name))),
xmlelement("m_ProtParamList",
xmlagg(
xmlelement("ParameterValues",
xmlelement("m_szProtocolName",tmp.protocol_name),
xmlelement("m_Time",xpsd.parameter_ntime_value))
group by tmp.ccd_test_id,tmp.intf_mtrl_prod_code)
order by tmp.ccd_test_id, tmp.intf_mtrl_prod_code, xps.protocol_step_intprotocolstep )
from XPR_tdef_mitigation_protocol tmp, xp_reagentlist xrl,
xpr_protocol_settings xps, xpr_protocol_settings_default xpsd
where tmp.ccd_test_id = tm.ccd_test_id
and tmp.ccd_test_id = xrl.ccd_test_id
and tmp.pack_prod_code = xrl.pack_prod_code
and tmp.intf_type = 1
and xps.protocol_name = xpsd.protocol_name
and xps.protocol_step_name = xpsd.protocol_step_name
and xps.ps_action_parameterlist = xpsd.ps_action_parameterlist
and xps.protocol_name = tmp.PROTOCOL_NAME
from XPtoXPRTdef_defn_mapping tm
where tm.DisplayName = 'SYPH'If I remove the xmlagg clause along with the group by clause, the query runs fine and give me the output.
But in that XML format of the output is incorrect for my application.
Could someone help here?Hi,
userAtoZ wrote:
I have the following query and I am getting ORA 00907 Error when I am using group by clause with the xmlagg function.
... xmlagg(
xmlelement("ParameterValues",
xmlelement("m_szProtocolName",tmp.protocol_name),
xmlelement("m_Time",xpsd.parameter_ntime_value))
group by tmp.ccd_test_id,tmp.intf_mtrl_prod_code)Please don't post unformatted code. When posting any formatted text on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
If the code above were formatted well, so that you could match each '(' with its closing ')', it would look something like this:... xmlagg ( xmlelement ( "ParameterValues"
, xmlelement ( "m_szProtocolName"
, tmp.protocol_name
, xmlelement ( "m_Time"
, xpsd.parameter_ntime_value
group by tmp.ccd_test_id
, tmp.intf_mtrl_prod_code
This is exactly what you posted, only the whitespace has been changed.
This makes it clear that the GROUP BY is inside the parentheses with the argument to XMLAGG. You can have an ORDER BY clause there, but not a GROUP BY clause. -
PL/SQL: ORA-22806: not an object or REF when Using Record in Package
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
I have declared a record type in my package
create or replace
PACKAGE MYPKG AS
TYPE MYREC IS RECORD (VAL1 varchar2(20), val2 date);
PROCEDURE display_error (pSQLERRM number);
PROCEDURE P_LOAD_DATA (pStartDate Date, pEndDate Date);
FUNCTION F_EPI(refno1 in NUMBER, refno2 in NUMBER) return MYREC;
END MYPKG;
--In My Package Body
FUNCTION F_EPI(refno1 in NUMBER, refno2 in NUMBER) return MYREC is
F_param MYREC;
BEGIN
select myvarchar2, mydate into MYREC from MYTable
where myrefno1 = refno1
and myrefno2 = refno2
Exception
when others then
display_error(SQLERRM);
RETURN F_param;
END F_EPI ;
PROCEDURE P_LOAD_DATA (pStartDate Date, pEndDate Date) IS
insert into atable(myvarchar, mydate)
select F_EPI(refno1,refno2).val1,F_EPI(refno1,refno2).val2 from tab2;
END P_LOAD_DATA;
I get errors
Error(187,7): PL/SQL: SQL Statement ignored
Error(225,7): PLS-00382: expression is of wrong type
Error(225,7): PL/SQL: ORA-22806: not an object or REF
When I compile the package.
When I try to call the function from SQL I get an Invalid datatype error.Hi,
Before posting any query/plsql blocks, please ensure that you have written it clean and complete with less syntax errors. ( at least general syntax errors, you can avoid). Then somebody can have an interest to check your logical error.
About your posting, refer below solution step-by-step. It may help you, about what you are looking for? By the way, you must be knowing, what you are going to to do with. I haven't concentrated about your requirement; as it was not missing in your posting.
drop table test;
create table test(myvarchar varchar2(20), mydate date);
create or replace
package mypkg as
type myrec is record (val1 varchar2(20), val2 date);
--procedure display_error (psqlerrm in number); -- if you are passing sqlerrm, then parameter needs to be string type
procedure display_error (psqlerrm in varchar2);
procedure p_load_data (pstartdate in date, penddate in date);
function f_epi(refno1 in number, refno2 in number) return myrec;
end mypkg;
Package created.
--in my package body
create or replace
package body mypkg as -- added
procedure display_error (psqlerrm in varchar2) -- if you are declared a proc/func in spec, it needs to define in pkg body
is
begin
null; -- you should know, what to do here
dbms_output.put_line('Err -'||sqlerrm);
end display_error;
function f_epi(refno1 in number,refno2 in number)
return myrec
is
f_param myrec;
begin
-- select myvarchar2, mydate into MYREC from mytable
-- where myrefno1 = refno1
-- and myrefno2 = refno2;
select ename, hiredate into f_param from emp -- added demo logic by using emp
where empno = refno1
and mgr = refno2;
return f_param; -- added
exception
when others then
raise; -- if you are using OTHERS then, just raise it
display_error(sqlerrm);
--return f_param; -- what is this?
end f_epi;
procedure p_load_data (pstartdate in date, penddate in date) -- you must be knowing the use of 2 params ???
is
v_rec myrec; -- added
begin -- Added
--insert into atable(myvarchar, mydate)
-- select f_epi(refno1,refno2).val1,f_epi(refno1,refno2).val1 from tab2;
-- demo logic added with static params to call f_epi
v_rec:= f_epi(7499,7698);
insert into test values v_rec;
--null;
end p_load_data;
end mypkg;
Package body created.
SQL> exec mypkg.p_load_data(null,null);
PL/SQL procedure successfully completed.
SQL> select * from test;
MYVARCHAR MYDATE
ALLEN 20-FEB-81
Thanks! -
ORA-22806 not an object or REF, Query for XMLType
Hi,
i am using this query :
select centre||compte, sum(cout) from (
SELECT o.INDICE_CENTRE as centre, substr(o.champs.extract('//compte/text()').getStringVal(),1,8)
as compte,to_number(substr(o.champs.extract('//cout/text()').getStringVal(),1,17)) as cout
FROM canevas o)
group by centre||compte;
i have got this error ORA-22806 not an object or REF.
any sugestion please?Problem resolved.
-
XML Generation using a sql query in an efficient way -Help needed urgently
Hi
I am facing the following issue while generating xml using an sql query. I get the below given table using a query.
CODE ID MARK
==================================
1 4 2331 809
2 4 1772 802
3 4 2331 845
4 5 2331 804
5 5 2331 800
6 5 2210 801
I need to generate the below given xml using a query
<data>
<CODE>4</CODE>
<IDS>
<ID>2331</ID>
<ID>1772</ID>
</IDS>
<MARKS>
<MARK>809</MARK>
<MARK>802</MARK>
<MARK>845</MARK>
</MARKS>
</data>
<data>
<CODE>5</CODE>
<IDS>
<ID>2331</ID>
<ID>2210</ID>
</IDS>
<MARKS>
<MARK>804</MARK>
<MARK>800</MARK>
<MARK>801</MARK>
</MARKS>
</data>
Can anyone help me with some idea to generate the above given CLOB messagenot sure if this is the right way to do it but
/* Formatted on 10/12/2011 12:52:28 PM (QP5 v5.149.1003.31008) */
WITH data AS (SELECT 4 code, 2331 id, 809 mark FROM DUAL
UNION
SELECT 4, 1772, 802 FROM DUAL
UNION
SELECT 4, 2331, 845 FROM DUAL
UNION
SELECT 5, 2331, 804 FROM DUAL
UNION
SELECT 5, 2331, 800 FROM DUAL
UNION
SELECT 5, 2210, 801 FROM DUAL)
SELECT TO_CLOB (
'<DATA>'
|| listagg (xml, '</DATA><DATA>') WITHIN GROUP (ORDER BY xml)
|| '</DATA>')
xml
FROM ( SELECT '<CODE>'
|| code
|| '</CODE><IDS><ID>'
|| LISTAGG (id, '</ID><ID>') WITHIN GROUP (ORDER BY id)
|| '</ID><IDS><MARKS><MARK>'
|| LISTAGG (mark, '</MARK><MARK>') WITHIN GROUP (ORDER BY id)
|| '</MARK></MARKS>'
xml
FROM data
GROUP BY code) -
Problem inserting value in CLOB column from an XML file using XSU
Hi,
When I try to insert CLOB value into Oracle9i database from an XML document using XSU, I get an exception as below.
09:37:32,392 ERROR [STDERR] oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: ORA-03237: Initial Extent of specified size cannot be allocated
ORA-06512: at "SYS.DBMS_LOB", line 395
ORA-06512: at line 1
' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
All Element tags in XML doc. is mapped to columns in the database. One of the table columns is CLOB. That is the one that gives the above exception. Here is the xml...
ID - is autogenerated value.
<?xml version="1.0" ?>
<ROWSET>
<ROW num="1">
<ID></ID>
<SEQ>
GCATAGTTGTTATGAAGAAATGGAAGAAAAATGCACTCAAAGTTGGGCTGTCAGGCTGTCTGGGGCTGAATTCTGGTGTGACAGTGTGATGAAGCCATCTTTGAGCCTAAATTTGATAATGAGCCAGTCATGATCTGGTTGTGATTACTATAACAAGATTAAATCTGAATAAGAGAGCCACAACTTCTTTAAAGACAGATTGTCAAGTCATTACATGGAAGAGGGAGATTGCTCCTTTGTAAATCAGGCTGTCAGGCCAACTGAATGAAGGACGTCATTGTACAGTAACCTGATGAAGATCAGATCAACCGCTCACCTCGCCG
</SEQ>
</ROW>
</ROWSET>
Can anyone identify what's the problem.. and suggest a solution for this..?
Thanks in advance..
VijiWould you please specify the XDK verison and database version?
-
Hi
I am following below link to hide/show my columns dynamically. See "Column Formatting"
http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187.pdf
As per doc, element can be made private/public.
<items type="PUBLIC">
<item>
<name>Plasma TV</name>
<quantity>10</quantity>
<price>4000</price>
</item>
<item>
And same can be used to hide the column using condition
<?if@column:/items/@type="PUBLIC"?>
MY QUESTION IS HOW TO DO THIS IN MY XML BELOW?
Below is part of my XML code which I am using in Data Definition for RTF.
<group name="GH3" source="QH3">
<element name="COLUMN_HEAD3" value="COLUMN_NAME" />
</group>
<group name="GH4" source="QH4">
<element name="COLUMN_HEAD4" value="COLUMN_NAME" />
</group>
I am getting output like this.
<LIST_GH3>
<GH3>
<COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
</GH3>
</LIST_GH3>
<LIST_GH4>
<GH4>
<COLUMN_HEAD4>XYZ</COLUMN_HEAD4>
</GH4>
</LIST_GH4>
In order to use logic as per oracle document I want output like this.
<LIST_GH3 type="PUBLIC">
<GH3>
<COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
</GH3>
</LIST_GH3>
<LIST_GH4 type="PRIVATE">
<GH4>
<COLUMN_HEAD4>BLANK</COLUMN_HEAD4>
</GH4>
</LIST_GH4>
What changes I need to make in my XML code to get the runtime output as above? Please help. Where do i need to make changes in the above xml? Group name? Element name?
I am planning to use below condition in RTF template to hide the column, but dont know how to set the type of column as PRIVATE/PUBLIC in the XML output used to populate data in the RTF at runtime.
<?if@column:/BTSPIEXP/LIST_GH3/@type=”PUBLIC”?>COLUMN_HEAD3<?end if?>
Regards,
Swapnil K.Hi,
Issue has been resolved. I used the value of the element to determine to display it or not.
Regards,
Swapnil K. -
Parsing a XML file using Jdom-Problem.
Hi all,
I am reposting it as I was told to format the code and send it again.
I am trying to parse a xml file using a jdom java code.This code works fine if I remove xmlns attribute in the root element. (I get the expected result) .If the "xmlns" attribute is put in the xml as it should be then the parsing and retrieving returns null. Please tell me how to fix this issue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xml
<process name="CreateKBEntryService" targetNamespace="http://serena.com/CreateKBEntryService" suppressJoinFailure="yes" xmlns:tns="http://serena.com/CreateKBEntryService" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:nsxml0="http://localhost:8080/axis/services/CreateKBEntryService" xmlns:nsxml1="http://DefaultNamespace" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
<partnerLinks>
<partnerLink name="client" partnerLinkType="tns:CreateKBEntryService" myRole="CreateKBEntryServiceProvider"/>
<partnerLink name="CreateKBEntryPartnerLink" partnerLinkType="nsxml0:CreateKBEntryLink" partnerRole="CreateKBEntryProvider"/>
</partnerLinks>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
Java:
import java.io.*;
import java.util.*;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
public class sample1 {
public static void main(String[] args) throws Exception {
// create a XML parser and read the XML file
SAXBuilder oBuilder = new SAXBuilder();
Document oDoc = oBuilder.build(new File("**xml file location**"));
Element root = oDoc.getRootElement();
System.out.println(root.getName());
String tgtns= root.getAttributeValue("targetNamespace");
System.out.println("tgt ns "+ tgtns);
List list= root.getChildren("partnerLinks");
Iterator it1= list.iterator();
System.out.println("Iterator 1 - "+list.size());
while(it1.hasNext()){
Element partnerlinks = (Element)it1.next();
List list2= partnerlinks.getChildren("partnerLink");
System.out.println("iterator 2 - "+list2.size());
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Result:
Without Xmlns in xml file(Expected and correct output)
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 1//expected and correct result that comes when I remove xmlns attribute from xml
iterator 2 - 2
Result with xmlns:
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 0 //instead of 0 should return 1LOL
This is what you get for working 12 hours straight....
I changed:
xmlObject["mydoc"]["modelglue"]["event-handlers"]["event-handler"][i].xmlAttrib utes["name"]<br>
to:
#mydoc["modelglue"]["event-handlers"]["event-handler"][i].xmlAttrib utes["name"]#<br>
xmlObject is the name of my xml object in memory, and then you reference from the root of the xml doc down the chain.
Sorry for the inconvenience,
Rich -
Problem loading XML-file using SQL*Loader
Hello,
I'm using 9.2 and tryin to load a XML-file using SQL*Loader.
Loader control-file:
LOAD DATA
INFILE *
INTO TABLE BATCH_TABLE TRUNCATE
FIELDS TERMINATED BY ','
FILENAME char(255),
XML_DATA LOBFILE (FILENAME) TERMINATED BY EOF
BEGINDATA
data.xml
The BATCH_TABLE is created as:
CREATE TABLE BATCH_TABLE (
FILENAME VARCHAR2 (50),
XML_DATA SYS.XMLTYPE ) ;
And the data.xml contains the following lines:
<?xml version="2.0" encoding="UTF-8"?>
<!DOCTYPE databatch SYSTEM "databatch.dtd">
<batch>
<record>
<data>
<type>10</type>
</data>
</record>
<record>
<data>
<type>20</type>
</data>
</record>
</batch>
However, the sqlldr gives me an error:
Record 1: Rejected - Error on table BATCH_TABLE, column XML_DATA.
ORA-21700: object does not exist or is marked for delete
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 1
If I remove the first two lines
"<?xml version="2.0" encoding="UTF-8"?>"
and
"<!DOCTYPE databatch SYSTEM "databatch.dtd">"
from data.xml everything works, and the contentents of data.xml are loaded into the table.
Any idea what I'm missing here? Likely the problem is with special characters.
Thanks in advance,I'm able to load your file just by removing the second line <!DOCTYPE databatch SYSTEM "databatch.dtd">. I dont have your dtd file, so skipped that line. Can you check if it's problem with ur DTD?
-
ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure n
ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)?
The details of this procedure are the emp table is used in the emp1 which is shown in line 19
1 DECLARE
2 cur_emp sys_refcursor;
3 TYPE t_tab IS TABLE OF emp%ROWTYPE;
4 tt t_tab;
5 cur_emp1 sys_refcursor;
6 TYPE t1_tab IS TABLE OF emp1%ROWTYPE;
7 tt1 t1_tab;
8 BEGIN
9 OPEN cur_emp FOR
10 SELECT c1,c2,c3 FROM t1,t2,t3 where t1.c1=t2.c2 and t1.c1=t3.c3;
11 LOOP
12 FETCH cur_emp BULK COLLECT INTO tt LIMIT 100000;
13 EXIT WHEN tt.COUNT=0;
14 FOR i IN 1..tt.COUNT LOOP
15 insert in to emp (c1,c2,c3) values (tt(i).c1,tt(i).c2,tt(i).c3;
16 END LOOP;
17 END LOOP;
18 OPEN cur_emp FOR
19 SELECT c11,c12,c13 FROM emp,t12,t13 where emp.c11=t12.c12 and t11.c11=t13.c13;
20 LOOP
21 FETCH cur_emp1 BULK COLLECT INTO tt1 LIMIT 100000;
22 EXIT WHEN tt1.COUNT=0;
23 FOR j IN 1..tt1.COUNT LOOP
24 insert in to emp1 (c11,c12,c13) values (tt1(j).c11,tt1(j).c12,tt1(j).c13;
25 END LOOP;
26 END LOOP;
27 END;
/ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)?
The details of this procedure are the emp table is used in the emp1 which is shown in line 19
1 DECLARE
2 cur_emp sys_refcursor;
3 TYPE t_tab IS TABLE OF emp%ROWTYPE;
4 tt t_tab;
5 cur_emp1 sys_refcursor;
6 TYPE t1_tab IS TABLE OF emp1%ROWTYPE;
7 tt1 t1_tab;
8 BEGIN
9 OPEN cur_emp FOR
10 SELECT c1,c2,c3 FROM t1,t2,t3 where t1.c1=t2.c2 and t1.c1=t3.c3;
11 LOOP
12 FETCH cur_emp BULK COLLECT INTO tt LIMIT 100000;
13 EXIT WHEN tt.COUNT=0;
14 FOR i IN 1..tt.COUNT LOOP
15 insert in to emp (c1,c2,c3) values (tt(i).c1,tt(i).c2,tt(i).c3);
16 END LOOP;
17 END LOOP;
18 OPEN cur_emp FOR
19 SELECT c11,c12,c13 FROM emp,t12,t13 where emp.c11=t12.c12 and emp.c11=t13.c13;
20 LOOP
21 FETCH cur_emp1 BULK COLLECT INTO tt1 LIMIT 100000;
22 EXIT WHEN tt1.COUNT=0;
23 FOR j IN 1..tt1.COUNT LOOP
24 insert in to emp1 (c11,c12,c13) values (tt1(j).c11,tt1(j).c12,tt1(j).c13);
25 END LOOP;
26 END LOOP;
27 END; -
Transform LiveCycle form xml output using xsl
I've completed my first form but now want to format the xml that's generated.
Whilst I work for a big Company, I don't think they'll stretch to purchasing the Reader Extensions Module so I can output as PDF. Also there will be more than 500 users completing the form, so I can't just extend the rights using Adobe Acrobat.
Therefore, I'd like to transform the xml created using xsl (as I have knowledge in this area) - I'd like the transformation to occur when the form is submitted via email so that a 'friendly' attachment is added to the email and not the xml output.
Any ideas on this one?First thing is, the fonts did not work in my system.. So I can not really understand where the email address fields are..
Few things:
1) You have used an Email submit button and tried to place the code in the MouseDown event.
You need to change this button to "Regular Type Button". and place the code in the Click event to work.
2) I placed a sample button and put in my code for your reference.. This is working fine..You can check the below sample.
https://acrobat.com/#d=tQa4E*8aA*mJq6aijSHuDQ
3) You can do the same way for your form..
4) If you have Acrobat software, you can enable JavaScript debugger which can give you the specific error message rather than Submit cancelled. If you do not, then you need to put some messageBox statements and check..
Thanks
Srini -
ORA-22806 : not an object or reference in 10gRel2
Hi,
We have recently successfully upgraded our oracle 8i database to 10.2.0.1
database is up and running fine, but
one of the user created procedure is giving error as below :
ORA-22806 : not an object or reference
See the below code :
=============
v_cnt:=0;
Check_Str := 'SELECT COUNT(*) FROM P_EMP_HOLIDAY_DATE
WHERE company_id=:p_Comp_id
AND branch_id = :rec_branch.branch_id
AND employee_id =:rec_emp.employee_id
AND :v_nxt_date IN holiday_date';
EXECUTE IMMEDIATE Check_Str INTO v_cnt USING p_Comp_id,rec_emp.branch_id, rec_emp.employee_id,v_nxt_date;
Put_Any_Line('v_cnt : ' || v_cnt);
when we run the procedure it gives the error at line 186 .i.e the line with EXECUTE IMMEDIATE statement in above
so where is the problem ?
this procedure was running fine without any problem in our oracle 8.1.7.0 version now showing error in 10.2.0.1
is there any syntax problem that is not being suported in the upgraded version i.e. 10.2.0.1
how to get it solved ?
As this is very urgent to solve so any immediate support would be appreciated.
with regardsWhat is Put_Any_Line ? Why are you using dynamic sql here ?
As this is very urgent to solve so any immediate support would be appreciated.Ok, then please, do not hesitate to use the Oracle support, and see how it can be immediate support.
Nicolas. -
Error using group by expression
hello friends,
I use this query & used group by but oracle give error :
ORA-00979: not a GROUP BY expression
Select uu.ID,max(uu.module_name) as MainMenu,uu.NAME,decode(substr(param_str,4,1), 'P','ü','') as Allow,decode(substr(param_str,1,1), 'A','ü','') as Ins,decode(substr(param_str,2,1), 'E','ü','') as Edit,decode(substr(param_str,3,1), 'D','ü','') as Del from USER_MODULE uu,user1 where( user_name='SA'or user_name is null)and user1.srno=uu.srno and uu.ID=uu.ID group by uu.id,uu.name,MainMenu group by uu.id,uu.nameHi
The 'param_str' in DECODE function either should be a bind variable for user input or should be a column of a table. If it is a table/view column then include it in the GROUP BY clause and the query should work.
If you specify a GROUP BY clause in a statement, then the select list can
contain only the following types of expressions:
– GROUP BY expressions
– Constants
– Aggregate functions and the functions USER, UID, and SYSDATE
– Expressions identical to those in the group_by_clause. If the group_by_
clause is in a subquery, then the GROUP BY columns of the subquery must
match the select list of the outer query. Any columns in the select list of the
subquery that are not needed by the GROUP BY operation are ignored without
error.
– Expressions involving the preceding expressions that evaluate to the same
value for all rows in a group
In short, except for the columns in aggregate functions, all columns must be included in the GROUP BY clause.
- Priya -
Error while loading an XML document using a structured application
Hi,
I try to load an XML document using a structured application defined in the default structapps.fm
My code is shown down, extracted from the FDK API code sample.
Problem, I always have the same message :
"Cannot find the file named e:\xml\AdobeFrameMaker10\file. Make sure that the file exists. "
Where "e:\xml\AdobeFrameMaker10\" is my install directory.
So I assume that frame try to find the structapps.fm file but does not find it.
What else can it be ?
Does anyone knowns how to achieve this simple task using extendScript ?
Thanks for any comments, Pierre
function openXMLFile(myLastFile) {
var filename = myLastFile.openDlg("Choose XML file ...", "*.xml", false);
if (filename != null) {
/* Get default open properties. Return if it can’t be allocated. */
var params = GetOpenDefaultParams();
/* Set properties to open an XML document*/
/*Specify XML as file type to open*/
var i = GetPropIndex(params, Constants.FS_OpenAsType)
params[i].propVal.ival = Constants.FV_TYPE_XML;
/* Specify the XML application to be used when opening the document.*/
i = GetPropIndex(params, Constants.FS_StructuredOpenApplication)
params[i].propVal.sval = "myApp";
i = GetPropIndex(params, Constants.FS_FileIsOldVersion)
params[i].propVal.ival = Constants.FV_DoOK
i = GetPropIndex(params, Constants.FS_FontNotFoundInDoc)
params[i].propVal.ival = Constants.FV_DoOK
i = GetPropIndex(params, Constants.FS_FileIsInUse)
params[i].propVal.ival = Constants.FV_DoCancel
i = GetPropIndex(params, Constants.FS_AlertUserAboutFailure)
params[i].propVal.ival = Constants.FV_DoCancel
/*The structapps.fm file containing the specified application must have
already been read. The default structapps.fm file is read when FrameMaker is
opened so this shouldn't be a problem if the application to be used is
listed in the structapps.fm file.*/
var retParm = new PropVals()
var fileObj = Open(filename, params, retParm);
return fileObj
} else {
return null;Pierre,
Depending on the object "myLastFile", the method openDlg might not even exist (if the myLastFile object is not a File object, for instance). And I do not see any need for the myLastFile anyhow, as you are presenting a dialog to select a file to open. I recommend using the global ChooseFile( ) method instead. This will give you a filename as string in full path notation, or null when no file was selected in the dialog. I am not sure what your ExtendScript documentation states about the return value for ChooseFile, but if that differs from what I am telling you here, the documentation is wrong. So, if you replace the first lines of your code with the following it should work:
function openXMLFile ( ) {
var filename = ChooseFile ( "Choose XML file ...", "", "*.xml", Constants.FV_ChooseSelect );
While writing this, I see that Russ has already given you the same advice. Use the symbolic constant value I indicated to use the ChooseFile dialog to select a single file (it can also be used to select a directory or open a file - but you want to control the opening process yourself). Note that this method allows you to set a start directory for the dialog (second parameter). The ESTK autocompletion also gives you a fifth parameter "helplink" which is undocumented and can safely be ignored.
Good luck
Jang -
Mandatory fields while using Group chart of accounts
Hi,
Which are the mandatory fields while maintaining GL accounts in FS00 if i am using Group chart of accounts.
And how attached these group chart of accounts gl to the operational chart of account GL.
rajHi,
the assignment from operational chart of accounts to group chart of accounts is done in OB13. Follow the steps in Customizing IMG FIn. Acc. (new) / Consolidation preparation (new) / General specifications / G/L and FS Charts of accounts...
Best regards, Christian
Maybe you are looking for
-
The case of the unbootable Macbook Air running Lion
I upgraded to Lion without issue on release day. This is a previous gen Macbook Air with all options including upgraded processor that ran Snow Leopard with no issues. It's literally a month and a half old. Last night I closed the lid just as the bat
-
Installing Oracle8i1.5 on Windows XP home
Hi, I am a student and I am learning Oracle.I want to install Oracle 8i on my notebook.I have oracle8i for windows 98.Can I install it? or shall I have to download Oracle 8i for windows2000. shyam
-
My ipod touch 3rd gen display is inverted colors
My ipod touch 3rd Gen. displays colors are inverted. i have read a bunch of stuff about acceabilty but this one doesnt have that. so im not sure where to go from here.
-
Cannot change title slide in slideshow on iPhoto
Made a slideshow in iPhoto, I cannot change the default text on the title slide
-
100% IOS7 Fix for (IMessage Waiting for Activation)
Hi there, I believe i have found the fix regarding the IOS7 IMessage Waiting for activation issue. So far i have advised a few friends and everyone of them has said it has fixed the problem Follow the below, as i would be keen to find out if this wor