Subtotal in Oracle
Hi all,
I've doubt by using cube and rollup.
here the data.
wkday colvol coldur
1 10 2
2 20 3
3 30 4
4 40 5
5 50 6
6 60 7
7 70 8
6
select wkday,colvol,coldur, null as colavg from gt_test
union
select null,null,null,(sum(colvol*coldur)/sum(colvol))colav
from gt_test
1. I'v need to get this of the by using above formula at the end of the weekday.
I got it from the above query.
logic : sum (colvol*coldur)/sum(colvol).
My question is can i do the above by using cube and rollup?
2.If I have the data for the month how to do it? currently I'm getting for the week.
Pls help me out.
Appreciated your help.
thanks & regards,
ramana.
<BR>
SQL> with gt_test as (
2 select 1 wkday, 10 colvol, 2 coldur from dual
3 union all
4 select 2, 20, 3 from dual
5 union all
6 select 3, 30, 4 from dual
7 union all
8 select 4, 40, 5 from dual
9 union all
10 select 5, 50, 6 from dual
11 union all
12 select 6, 60, 7 from dual
13 union all
14 select 7, 70, 8 from dual
15 )
16 select wkday, sum(colvol), sum(coldur), sum(colvol*coldur)/sum(colvol) as colavg
17 from gt_test
18 group by cube(wkday)
19 ;
WKDAY SUM(COLVOL) SUM(COLDUR) COLAVG
280 35 6
1 10 2 2
2 20 3 3
3 30 4 4
4 40 5 5
5 50 6 6
6 60 7 7
7 70 8 8
8 rows selected
Similar Messages
-
Parsing XML file & insert into Oracle Tables
Hi,
Following is a sample xml file which is an input for a oracle procedure :
<Sales ID="1" CreatedDate="16-Jan-2007" CreatedTime="16:09:40">
<Customer ID="1" Name="Scott" Address="City1">
<Order ID="1" Date="15-Jan-2007" TotItems="2" Value="200">
<Item ID="01" Name="Chocolate" Qty="2" Amount="80" />
<Item ID="03" Name="Biscuit" Qty="5" Amount="120" />
</Order>
</Customer>
<Customer ID="2" Name="Tiger" Address="City2">
<Order ID="1" Date="15-Jan-2007" TotItems="1" Value="500">
<Item ID="01" Name="Pizza" Qty="3" Amount="500" />
</Order>
</Customer>
<User ID="ABC" Name="TestUser" LastLogin="16-Jan-2007" />
<City Code="NY" Name="New York" />
<City Code="NJ" Name="New Jersy" />
</Sales>
I have individual tables for Sales, Customer, Order, Item, User & City tags with proper referential constraints. I have to parse the xml & have to insert the corresponsing tables for each & every tag if the ID in individual tag does not exists in the table. If the ID already exist, then, I have to update other attributes in the table for the corresponding ID.
Can anyone suggest me the simplest way to perform the above said scenario?Dera Michael,
Sorry for the confusing previous reply. I went through your solution again and tried for my XML File.
I have stored the XML File in table XXLF_DS_XML.Should I make use of the table in the below query.
Here is my SQL Query erroring Out
SQL> SELECT EXTRACTVALUE(s.COLUMN_VALUE,
2 '/Header@orderID') ID
3 ,EXTRACTVALUE(c.COLUMN_VALUE,
4 '/Detail@lineNumber') lienum
5 ,EXTRACTVALUE(t.COLUMN_VALUE,
6 '/Detail/Tax@currency') currency
7 ,EXTRACTVALUE(t.COLUMN_VALUE,
8 '/Detail/Tax/Money') customer_name
9 FROM TABLE(XMLSEQUENCE(EXTRACT(XMLTYPE('- <Recordset>
10 - <Header dueDate="2007-01-17T16:09:05" orderDate="2004-01-17" orderID="0009" transactionID="1389"
type="new">
11 <KeyIndex>2</KeyIndex>
12 - <BillTo>
13 - <Address addressID="5619" isoCountryCode="US">
14 <Name>fMat</Name>
15 - <PostalAddress name="default">
16 <Street>34545</Street>
17 <City>dfgfg</City>
18 <State>AZ</State>
19 <PostalCode>85086-1693</PostalCode>
20 <County>Maricopa</County>
21 <Country>US</Country>
22 </PostalAddress>
23 <Email name="default">[email protected]</Email>
24 </Address>
25 </BillTo>
26 <PromotionCode />
27 - <SubTotal>
28 <Money currency="USD">32.49</Money>
29 </SubTotal>
30 - <Tax>
31 <Money currency="USD">2.32</Money>
32 <Description />
33 </Tax>
34 - <Shipping>
35 <Money currency="USD">8.95</Money>
36 <Description />
37 </Shipping>
38 </Header>
39 - <Detail lineNumber="1" quantity="1">
40 - <ItemDetail>
41 - <UnitPrice>
42 <Money currency="USD">29.99</Money>
43 </UnitPrice>
44 <ShortName>Little;reg; pxxxx® Learning System</ShortName>
45 </ItemDetail>
46 - <Tax>
47 <Money currency="USD">1.68</Money>
48 <Description />
49 - <TaxDetail category="sales">
50 - <TaxAmount>
51 <Money currency="USD">1.68</Money>
52 </TaxAmount>
53 <TaxLocation>AZ</TaxLocation>
54 </TaxDetail>
55 </Tax>
56 </Detail>
57 - <Detail lineNumber="2" quantity="1">
58 - <ItemDetail>
59 - <UnitPrice>
60 <Money currency="USD">29.99</Money>
61 </UnitPrice>
62 <ShortName>Little;reg; pxxxx® Learning System</ShortName>
63 </ItemDetail>
64 - <Tax>
65 <Money currency="USD">1.68</Money>
66 <Description />
67 - <TaxDetail category="sales">
68 - <TaxAmount>
69 <Money currency="USD">1.68</Money>
70 </TaxAmount>
71 <TaxLocation>AZ</TaxLocation>
72 </TaxDetail>
73 </Tax>
74 - <Tax>
75 <Money currency="USD">0.68</Money>
76 <Description />
77 - <TaxDetail category="sales">
78 - <TaxAmount>
79 <Money currency="USD">0.68</Money>
80 </TaxAmount>
81 <TaxLocation>DISTRICT</TaxLocation>
82 </TaxDetail>
83 </Tax>
84 </Detail>
85 </Recordset>'),'/Recordset/Header'))) s
86 ,TABLE(XMLSEQUENCE(EXTRACT(c.COLUMN_VALUE,
87 '/Recordset/Detail'))) c
88 ,TABLE(XMLSEQUENCE(EXTRACT(t.COLUMN_VALUE,
89 '/Recordset/Detail/Tax'))) t
90 /
,TABLE(XMLSEQUENCE(EXTRACT(c.COLUMN_VALUE,
ERROR at line 86:
ORA-00904: "C"."COLUMN_VALUE": invalid identifier
Here is my XML Data
<Recordset>
<Header dueDate="2007-01-17T16:09:05" orderDate="2004-01-17" orderID="0009" transactionID="1389"
type="new">
<KeyIndex>2</KeyIndex>
<BillTo>
<Address addressID="5619" isoCountryCode="US">
<Name>fMat</Name>
<PostalAddress name="default">
<Street>34545 </Street>
<City>dfgfg</City>
<State>AZ</State>
<PostalCode>85086-1693</PostalCode>
<County>Maricopa</County>
<Country>US</Country>
</PostalAddress>
<Email name="default">[email protected]</Email>
</Address>
</BillTo>
<PromotionCode/>
<SubTotal>
<Money currency="USD">32.49</Money>
</SubTotal>
<Tax>
<Money currency="USD">2.32</Money>
<Description/>
</Tax>
<Shipping>
<Money currency="USD">8.95</Money>
<Description/>
</Shipping>
</Header>
<Detail lineNumber="1" quantity="1">
<ItemDetail>
<UnitPrice>
<Money currency="USD">29.99</Money>
</UnitPrice>
<ShortName>Little;reg; pxxxx® Learning System </ShortName>
</ItemDetail>
<Tax>
<Money currency="USD">1.68</Money>
<Description/>
<TaxDetail category="sales">
<TaxAmount>
<Money currency="USD">1.68</Money>
</TaxAmount>
<TaxLocation>AZ</TaxLocation>
</TaxDetail>
</Tax>
</Detail>
<Detail lineNumber="2" quantity="1">
<ItemDetail>
<UnitPrice>
<Money currency="USD">29.99</Money>
</UnitPrice>
<ShortName>Little;reg; pxxxx® Learning System </ShortName>
</ItemDetail>
<Tax>
<Money currency="USD">1.68</Money>
<Description/>
<TaxDetail category="sales">
<TaxAmount>
<Money currency="USD">1.68</Money>
</TaxAmount>
<TaxLocation>AZ</TaxLocation>
</TaxDetail>
</Tax>
<Tax>
<Money currency="USD">0.68</Money>
<Description/>
<TaxDetail category="sales">
<TaxAmount>
<Money currency="USD">0.68</Money>
</TaxAmount>
<TaxLocation>DISTRICT</TaxLocation>
</TaxDetail>
</Tax>
</Detail>
</Recordset>
Thanks -
Subtotal issue when subtotaling on a calc field built using CASE function
Okay, I hpe I can explain this well. May be possible that this is something cannot handle in Discoverer. I am using Discoverer Plus to develop a new workbook - cross project expenditure inquiry. A requirement is to not allow a worksheet user to see labor cost (since possible to figure out someone's salary) amount unless they are allowed to view labor cost. I have a function that returns a Y/N value that tells me if they can view labor cost. That works out just fine. So what I am doing is taking my database cost column (which is defined as Number(22,5) in the Oracle table. I create a new calculated column, basically like this -
CASE WHEN expenditure type <> LABOR THEN cost WHEN view labor cost = 'Y' THEN cost ELSE NULL END.
That calculated column is working just fine. I am seeing my desired results in that column. Okay so far.
Next, the users want subtotals by project organization and project. So I created a new total. When I did that, my subtotal row amount is blank.
Okay, I have seen this happen with NULLS before. Like in the gl_je_lines tables, where the accounted_Dr and accounted_Cr may be null, and have to do a NVL function to convert the null to 0 and allow me to subtotal on the column in a Discoverer workbook.
So I tried creating a second calculation -
NVL(Cost,0)
So I return the cost if not null, otherwise I return 0. Second calc column results look okay.
Now I did a subtotal on the second calculation. Oops. Wrong result. Amount is shown as 0.
For grins, I went back to my CASE statement on my first calculation and changed the ELSE condtion from NULL to 0. When I did that, the subtotal on that column changes from a blank (Null) value to a 0 value. Well, better, but still just like my second calculation subtotal.
Obviously the users have the option to export to Excel and subtotal in Excel.
Does anyone know of a way to get a good subtotal in this kind of situation, where I am attempting to subtotal on a calculated field that is built on a CASE function? Or am I out of luck when it comes to Discoverer?
John DickeyOkay, I did find a workaround, though I do not understand why the workaround works, but why the way I first tried to get a subtotal did not work. What I did is that I had to go to Discoverer Administrator. I picked my folder and did an Insert/Item. I created my new item building the same CASE statement that I used in my worksheet to create a new calculation. I then closed Discoverer Plus and reopened Discoverer Plus. Opened my worksheet. Edited the worksheet and brought in my new (derived) item from my folder. Then I created my subtotals for this secured cost amount. Voila. I get a number now, and the subtotal amount appears to be correct (still testing/verifying, but looks okay so far). So I deleted my subtotals on my calculated column and then deleted the calculation, to get that stuff out of the report. Sure would be nice if there was documentation in the Discoverer manuals about this.
John Dickey -
How to make a billing forms in oracle forms 6.0?
hi,i want to make a sample billing form in oracle forms.my fields details
itemcode varchar2(6);
itemname varchar2(25);
quantity number(5); prompt quantity in kg
selling_price number(5);
subtotal number(5);
total number(6);
i have no idea about billing application.if i want to make "subtotal" and "total" as database item?,i only want to show the total price on "total" and "subtotal" fields.i will make "total" field as single record item.and set all others are 10 records displayed.please help me further.i want sellingprice*quantity=subtotal.at last i want to get subtotal+subtotal+n(sum of all subtotal)=total.total is a single display field at bottom.if we entered all items i want to show the total at bottom.i know my concept is so stupid.please help me to make a proper forms.real thanks for reading my question.I think you've got worse problems than building the form.
First you need a proper data model. Billing will involve more than one table, with master - detail relations and that kind of very nice things that a database can achieve.
Then, once you have designed a datamodel that fits your requirements, you will have to build the form with the builder. It is not a hard tool, but needs a minimum learning.
Don't take me wrong, but I don't think you can come here and ask such a generic issue. -
Implementing Total and Subtotal in ADF tables
Hi i use Jdeveloper 11.1.2.3.0...
Please i just came across the ADF table subtotal and total function in oracle Docs but it didnt specify steps on how to accomplish that..... Im not a pro, so please if anyone has a link or link to a tutorial or can tell me the necessary steps to take so as to accomplish the subtotal and total in my ADF table, i will be very grateful.
I await your reply.
Thank you
OBYYSOk.. let me explain fully so you capture what in doing here....
What i have is an SQL Query view (with a rollup) which has an input text, i highlight the input and in the properties Inspector --> Style --> contentStyle... i add the code "#{row.Course==null and row.Semester==null and row.Levell==null ? 'font-weight:bold;':'' But it shows thesame error, i also tried "inlineStyle" and it throws thesame error....
(If you have skype you can add me [email protected] or mail me yours, i will be grateful)
I appreciate your time, thank you... -
Regarding subtotal of cross tab report
Post Author: bhaski
CA Forum: Formula
hi
i am fetching data in my back end in this way --->
header heder
col1,col2,col3 col1,col2,col3
now header has three value header1,header2,header3.
means i have two data setwith same column.
now in crystal in crosstab i palced this header in column.
therefore three subtotal for each header is created with corresponding col1,col2,col3 values.
Now my problem is i want only one subtotal column .How i can suppress the other two subtotal column.
Hope i make u understand to this forum's gurus.
thanx in advance.
my crystal version is 9.2 and me using oracle 10g r2Hi,
What exactly do you mean by "cross tab report"...do you mean a web report with different tabs? -
How to handle goup sub total for each group in oracle query ?
hi,
i want to handle one complex thing in oracle query.
i have a grouping in my oracle query.
i want to do sub total for each group in query and after that i want to subtract one group sub total from previous group subtotal ?
so how can i handle this in oracle query ?
any help is greatly appreciated.
thanks.Hello
Interesting requirement.
I wonder why are you not using these calculation during the display time. If it is acceptable then you can try using the custom formula with the running total combination in crystral report to achieve to get the required results.
Best regards
Ali Hadi -
Error while invoking a WS-Security secured web service from Oracle BPEL..
Hi ,
We are facing some error while invoking a WS-Security secured web service from our BPEL Process on the windows platform(SOA 10.1.3.3.0).
For the BPEL process we are following the same steps as given in an AMIS blog : - [http://technology.amis.nl/blog/1607/how-to-call-a-ws-security-secured-web-service-from-oracle-bpel]
but sttill,after deploying it and passing values in it,we are getting the following error on the console :-
“Header [http://schemas.xmlsoap.org/ws/2004/08/addressing:Action] for ultimate recipient is required but not present in the message”
Any pointers in this regard will be highly appreciated.
Thanks,
SaurabhHi James,
Thanks for the quick reply.
We've tried to call that web service from an HTML designed in Visual Studios with the same username and password and its working fine.
But on the BPEL console, we are getting the error as mentioned.
Also if you can tell me how to set the user name and password in the header of the parter link.I could not find how to do it.
Thanks,
Saurabh -
Error while running a customize report in oracle ebs
Hi ..
can anybody suggest how to solve the follwing error while running a customize report in oracle ebs?
XXIFMS: Version : UNKNOWN
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
Current system time is 03-JUN-2011 11:09:24
+-----------------------------
| Starting concurrent program execution...
+-----------------------------
Arguments
P_DATE_FROM='2010/04/01 00:00:00'
P_DATE_TO='2011/06/03 00:00:00'
Forcing NLS_NUMERIC_CHARACTERS to: '.,' for XDO processing
APPLLCSP Environment Variable set to :
Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
American_America.AL32UTF8
stat_low = 9
stat_high = 0
emsg:was terminated by signal 9
ld.so.1: rwrun: fatal: librw.so: open failed: No such file or directory
Start of log messages from FND_FILE
End of log messages from FND_FILE
Program was terminated by signal 9
Concurrent Manager encountered an error while running Oracle*Report for your concurrent request 1068011.
Review your concurrent request log and/or report output file for more detailed information.
Executing request completion options...
------------- 1) PUBLISH -------------
Beginning post-processing of request 1068011 on node D0005 at 03-JUN-2011 11:09:24.
Post-processing of request 1068011 failed at 03-JUN-2011 11:09:24 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
Finished executing request completion options.
Concurrent request completed
Current system time is 03-JUN-2011 11:09:24Please post the details of the application release, database version and OS.
Is the issue with this specific concurrent program?
Can you find any errors in the CM/OPP log files?
Please see if these docs help.
On R12.1.1/Solaris Platform While Generating Oracle Reports Files Failed With Error " ld.so.1: rwconverter: fatal: librw.so: open failed: No such file or directory [ID 1067786.1]
Apps UPG Fail With Error Ld.So.1: Rwserver: Fatal: Librw.So [ID 961222.1]
Thanks,
Hussein -
HELP! Can not install Oracle 8.1.5 w/ RedHat 6.1!
I can not get Oracle 8.1.5 to install onto Linux RedHat 6.1. The
Oracle installation script generates several errors. I have
tried several attempts, using different options, but they all
generate errors.
Please help. The Oracle Installation scripts appear to be very
buggy... or perhaps they are incompatible with the standard
RedHat 6.1 release. Either way, it is very frustrating.
I have documented one of my (failed) installation attempts below.
Does anyone have any words of wisdom?
I am installing Oracle onto a Dell Latitude CPi PC w/ 128MB RAM,
a 366MHz Pentium II, and RedHat 6.1 (using the standard Linux
2.2.12-2 kernel). RedHat was installed using the standard "Gnome
Workstation" configuration.
The Oralce CD is labeled:
"Oralce 8i Enterprise Edition
Release 8.1.5
for Linux
(c) Oracle Corporation 1999"
I got this CD about one week ago at Oracle OpenWorld '99 in Los
Angeles... it should be their "latest & greatest" version so far.
1. Pre-Installation and ./runInstall
I created an "oracle" Unix account w/ groups "oinstall" (the
primary group) and "dba" (a secondary group).
I created directories /u01 through /u04, belonging to oracle.
I setup .cshrc and sourced it, containing:
umask 022
setenv DISPLAY `hostname`:0
xhost +
setenv ORACLE_BASE /u01/app/oracle
setenv ORACLE_HOME ${ORACLE_BASE}/product/8.1.5
setenv ORACLE_SID cprtest
setenv PATH ${ORACLE_HOME}/bin:${PATH}
setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib
setenv NLS_LANG US7ASCII
I downloaded jre116_v5 and installed to /usr/local/jre.
Finally, I executed (from the "oracle" Unix account):
cd /mnt/cdrom
./runInstall
Problem: I got the error (from ./runInstall):
Initializing Java Virtual Machine from /usr/local/jre/bin/jre.
Please wait...
Error in CreateOUIProcess(): -1
: Bad address
Workaround: Executed the following commands instead:
cd /mnt/cdrom/install/linux
./runIns.sh
3. runIns.sh and root.sh
I selected the following options (from ./runIns.sh):
Source: /mnt/cdrom/stage/products.jar
Destination: /u01/app/oracle/product/8.1.5
Oracle 8i Enterprise Edition 8.1.5.0.0
Typical (585MB)
Installable Components: Oralce Intelligent Agent 8.1.5.0.0
Global Database Name: cprtest.parkrussell.com
SID: cprtest
Directory for Database Files: /u02
Then (when instructed by ./runIns.sh), I attempted to execute
(from the
"root" Unix account):
cd /u01/app/oracle/product/8.1.5
./root.sh
Problem: I got the error:
"bash: ./root.sh: Permission denied"
The execute bit was not set.
Workaround: I executed:
chmod a+x root.sh
./root.sh
5. Configuration Tools
The Oracle Installer (./runIns.sh) attempted to execute:
A. Net8 Configuration Agent
B. Oracle Database Configuration Agent
Problem: The "Oracle Database Configuration Agent" failed with
the following error message:
"One or more tools have failed. It is recommended but not
required that these tools succeed for this installation.
You can now select these tools, read its details to examine
why they have failed, fix those problems, and retry them.
Or, you can click "Next" to continue."
When I selected the "Oracle Database Configuration Agent" for
more info, I got the following additional details (as the cause
of the error):
"A required command line argument is missing."
The log file
"/u01/app/oracle/oraInventory/logs/installActions.log" recorded:
"Command which is being spawned is /usr/local/jre/bin/jre
-Duser.dir=/u01/app/oracle/product/8.1.5/assistants/dbca/jlib
-classpath
/usr/local/jre/lib/rt.jar:/u01/app/oracle/product/8.1.5/jlib/ewt-3_1_10.jar:/u01/app/oracle/produc
/8.1.5/jlib/share-1_0_6.jar:/u01/app/oracle/product/8.1.5/assistants/dbca/jlib/DBAssist.jar:/u01/a
p/oracle/product/8.1.5/assistants/jlib/jnls.jar:/u01/app/oracle/product/8.1.5/assistants/jlib/ACC.
AR:/u01/app/oracle/product/8.1.5/jlib/help-3_0_7.jar:/u01/app/oracle/product/8.1.5/jlib/oracle_ice
4_03_3.jar:/u01/app/oracle/product/8.1.5/jlib/HotJavaBean.jar:/u01/app/oracle/product/8.1.5/jlib/n
tcfg.jar:/usr/local/jre/lib/i18n.jar
DBCreateWizard /createtype seed /numusers NO_VALUE /apptype
NO_VALUE /cartridges NO_VALUE /options NO_VALUE /demos NO_VALUE
/seedloc NO_VALUE /sid cprtest /orahome
/u01/app/oracle/product/8.1.5 /orabase /u01/app/oracle /dbloc
/u02 /clususer NO_VALUE /cluspswd NO_VALUE /nodeinfo NO_VALUE
/gdbName cprtest.parkrussell.com
Invalid Exit Code. The following result code will be used for
configuration tool: 1
Configuration tool Oracle Database Configuration Assistant
failed"
Workaround: There is obviously nothing I can do to fix this
problem. It appears to be an internal bug in ./runIns.sh.
Therefore, I selected "Next" and executed "dbassist" directly.
6. dbassist
I executed:
dbassist
Problem: I got the following error:
"JNLS Execution:oracle.ntpg.jnls.JNLSException
Unable to find any National Character Sets. Please
check your Oracle installation."
Workaround: Press "OK" and ignore the error.
7. dbassist (cont.)
I selected the following options:
Create database
Typical
Copy existing database files from the CD
Global Database Name: cprtest.parkrussell.com
SID: cprtest
Problem: I got the following error:
"CD-ROM drive not detected on this system.
Database not created."
(Note: I've been running the installation scripts from the
CDROM drive this entire time. "df" shows the CDROM drive
mounted on /mnt/cdrom. "ls /mnt/cdrom" works too.)
Workaround: Abort (which generated the additional error: "Unable
to create database. DBCA-00003: No CD-ROM drive detected.") and
run dbassist again, this time using different parameters.
8. dbassist, again
I executed "dbassist" again and selected the following options:
Create database
Typical
Create new database files
Hybrid
Concurrently connected users: 5
Options: Oralce interMedia, Oralce JServer, and iM demos
Global Database Name: cprtest2.parkrussell.com
SID: cprtest2
Create database now
Problem: I got the following error:
"ORA-01012: not logged on"
Workaround: Try, try again.
9. dbassist, one last time
Executed "dbassist" once more and selected the following options:
Create database
Typical
Create new database files
Hybrid
Concurrently connected users: 5
Options: Oralce interMedia, Oralce JServer, and interMedia
demos
Global Database Name: cprtest3.parkrussell.com
SID: cprtest3
Output creation script
Then, I executed (from the "oracle" Unix account):
cd /u01/app/oracle/product/8.1.5/install
setenv ORACLE_SID cprtest3
./sqlcprtest3.sh
Problem: I got the following output:
"Oracle Server Manager Release 3.1.5.0.0 - Production
(c) Copyright 1997, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production
SVRMGR> SVRMGR> Connected.
SVRMGR> ORACLE instance started.
ORA-01012: not logged on
SVRMGR> 2> 3> 4> 5> 6> 7>
8> 9> CREATE DATABASE "cprtest3"
ORA-01012: not logged on
SVRMGR> Disconnected."
Workaround: Beats me.
10. sqlplus
I attempted to execute sqlplus, but got the following error
message:
"/u01/app/oracle/product/8.1.5/bin/sqlplus: Permission denied."
The execute bit was not set.
Workaround: I executed:
chmod a+x /u01/app/oracle/product/8.1.5/bin/sqlplus
sqlplus
I gave up for now... there were just too many things wrong with
this installation, starting with the very first command I was
supposed to execute (./runInstaller).
I can't fathom why Oracle's installation script has so many bugs.
Am I just doing something terribly wrong?
Please help.
nullI'm using enlightenment version 0.15.5-41, which is more recent
than the 0.15.5-37 version (containing the Oracle installer
patch) that you recommended. Unfortunately, it fails when using
this version.
I also tried installing Oracle using twm, with enlightenment
disabled. This didn't help either.
Furthermore, the errors that I'm encountering in the OUI are
not just toward the end of the installation. They happen from
the very beginning, right after I enter "./runInstall", and
continue every step of the way.
Calvin Mitchell (guest) wrote:
: Check out my thread: "Assistants Failure Toward end of Oracle
: Install" to see where i've gone with this.
: if your running Enlightenment as your window manager you need
to
: upgrade to 0.15.5-37, that will solve the OUI error.
: Let me know if you solve any of your problems.
: Chris Russell (guest) wrote:
: : I can not get Oracle 8.1.5 to install onto Linux RedHat 6.1.
: The
: : Oracle installation script generates several errors. I have
: : tried several attempts, using different options, but they all
: : generate errors.
: : Please help. The Oracle Installation scripts appear to be
very
: : buggy... or perhaps they are incompatible with the standard
: : RedHat 6.1 release. Either way, it is very frustrating.
: : I have documented one of my (failed) installation attempts
: below.
: : Does anyone have any words of wisdom?
: : I am installing Oracle onto a Dell Latitude CPi PC w/ 128MB
: RAM,
: : a 366MHz Pentium II, and RedHat 6.1 (using the standard Linux
: : 2.2.12-2 kernel). RedHat was installed using the standard
: "Gnome
: : Workstation" configuration.
: : The Oralce CD is labeled:
: : "Oralce 8i Enterprise Edition
: : Release 8.1.5
: : for Linux
: : (c) Oracle Corporation 1999"
: : I got this CD about one week ago at Oracle OpenWorld '99 in
Los
: : Angeles... it should be their "latest & greatest" version so
: far.
: : 1. Pre-Installation and ./runInstall
: : I created an "oracle" Unix account w/ groups "oinstall" (the
: : primary group) and "dba" (a secondary group).
: : I created directories /u01 through /u04, belonging to oracle.
: : I setup .cshrc and sourced it, containing:
: : umask 022
: : setenv DISPLAY `hostname`:0
: : xhost +
: : setenv ORACLE_BASE /u01/app/oracle
: : setenv ORACLE_HOME ${ORACLE_BASE}/product/8.1.5
: : setenv ORACLE_SID cprtest
: : setenv PATH ${ORACLE_HOME}/bin:${PATH}
: : setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib
: : setenv NLS_LANG US7ASCII
: : I downloaded jre116_v5 and installed to /usr/local/jre.
: : Finally, I executed (from the "oracle" Unix account):
: : cd /mnt/cdrom
: : ./runInstall
: : Problem: I got the error (from ./runInstall):
: : Initializing Java Virtual Machine from
: /usr/local/jre/bin/jre.
: : Please wait...
: : Error in CreateOUIProcess(): -1
: : : Bad address
: : Workaround: Executed the following commands instead:
: : cd /mnt/cdrom/install/linux
: : ./runIns.sh
: : 3. runIns.sh and root.sh
: : I selected the following options (from ./runIns.sh):
: : Source: /mnt/cdrom/stage/products.jar
: : Destination: /u01/app/oracle/product/8.1.5
: : Oracle 8i Enterprise Edition 8.1.5.0.0
: : Typical (585MB)
: : Installable Components: Oralce Intelligent Agent 8.1.5.0.0
: : Global Database Name: cprtest.parkrussell.com
: : SID: cprtest
: : Directory for Database Files: /u02
: : Then (when instructed by ./runIns.sh), I attempted to execute
: : (from the
: : "root" Unix account):
: : cd /u01/app/oracle/product/8.1.5
: : ./root.sh
: : Problem: I got the error:
: : "bash: ./root.sh: Permission denied"
: : The execute bit was not set.
: : Workaround: I executed:
: : chmod a+x root.sh
: : ./root.sh
: : 5. Configuration Tools
: : The Oracle Installer (./runIns.sh) attempted to execute:
: : A. Net8 Configuration Agent
: : B. Oracle Database Configuration Agent
: : Problem: The "Oracle Database Configuration Agent" failed
with
: : the following error message:
: : "One or more tools have failed. It is recommended but not
: : required that these tools succeed for this installation.
: : You can now select these tools, read its details to
examine
: : why they have failed, fix those problems, and retry them.
: : Or, you can click "Next" to continue."
: : When I selected the "Oracle Database Configuration Agent" for
: : more info, I got the following additional details (as the
cause
: : of the error):
: : "A required command line argument is missing."
: : The log file
: : "/u01/app/oracle/oraInventory/logs/installActions.log"
: recorded:
: : "Command which is being spawned is /usr/local/jre/bin/jre
: : -Duser.dir=/u01/app/oracle/product/8.1.5/assistants/dbca/jlib
: : -classpath
/usr/local/jre/lib/rt.jar:/u01/app/oracle/product/8.1.5/jlib/ewt-
: 3_1_10.jar:/u01/app/oracle/product/8.1.5/jlib/share-
1_0_6.jar:/u01/app/oracle/product/8.1.5/assistants/dbca/jlib/DBAs
sist.jar:/u01/app/oracle/product/8.1.5/assistants/jlib/jnls.jar:/
u01/app/oracle/product/8.1.5/assistants/jlib/ACC.JAR:/u01/app/ora
: cle/product/8.1.5/jlib/help-
: 3_0_7.jar:/u01/app/oracle/product/8.1.5/jlib/oracle_ice-
4_03_3.jar:/u01/app/oracle/product/8.1.5/jlib/HotJavaBean.jar:/u0
1/app/oracle/product/8.1.5/jlib/netcfg.jar:/usr/local/jre/lib/i18
: n.jar
: : DBCreateWizard /createtype seed /numusers NO_VALUE /apptype
: : NO_VALUE /cartridges NO_VALUE /options NO_VALUE /demos
NO_VALUE
: : /seedloc NO_VALUE /sid cprtest /orahome
: : /u01/app/oracle/product/8.1.5 /orabase /u01/app/oracle /dbloc
: : /u02 /clususer NO_VALUE /cluspswd NO_VALUE /nodeinfo NO_VALUE
: : /gdbName cprtest.parkrussell.com
: : Invalid Exit Code. The following result code will be used
for
: : configuration tool: 1
: : Configuration tool Oracle Database Configuration Assistant
: : failed"
: : Workaround: There is obviously nothing I can do to fix this
: : problem. It appears to be an internal bug in ./runIns.sh.
: : Therefore, I selected "Next" and executed "dbassist"
directly.
: : 6. dbassist
: : I executed:
: : dbassist
: : Problem: I got the following error:
: : "JNLS Execution:oracle.ntpg.jnls.JNLSException
: : Unable to find any National Character Sets. Please
: : check your Oracle installation."
: : Workaround: Press "OK" and ignore the error.
: : 7. dbassist (cont.)
: : I selected the following options:
: : Create database
: : Typical
: : Copy existing database files from the CD
: : Global Database Name: cprtest.parkrussell.com
: : SID: cprtest
: : Problem: I got the following error:
: : "CD-ROM drive not detected on this system.
: : Database not created."
: : (Note: I've been running the installation scripts from the
: : CDROM drive this entire time. "df" shows the CDROM drive
: : mounted on /mnt/cdrom. "ls /mnt/cdrom" works too.)
: : Workaround: Abort (which generated the additional error:
: "Unable
: : to create database. DBCA-00003: No CD-ROM drive detected.")
: and
: : run dbassist again, this time using different parameters.
: : 8. dbassist, again
: : I executed "dbassist" again and selected the following
options:
: : Create database
: : Typical
: : Create new database files
: : Hybrid
: : Concurrently connected users: 5
: : Options: Oralce interMedia, Oralce JServer, and iM demos
: : Global Database Name: cprtest2.parkrussell.com
: : SID: cprtest2
: : Create database now
: : Problem: I got the following error:
: : "ORA-01012: not logged on"
: : Workaround: Try, try again.
: : 9. dbassist, one last time
: : Executed "dbassist" once more and selected the following
: options:
: : Create database
: : Typical
: : Create new database files
: : Hybrid
: : Concurrently connected users: 5
: : Options: Oralce interMedia, Oralce JServer, and interMedia
: : demos
: : Global Database Name: cprtest3.parkrussell.com
: : SID: cprtest3
: : Output creation script
: : Then, I executed (from the "oracle" Unix account):
: : cd /u01/app/oracle/product/8.1.5/install
: : setenv ORACLE_SID cprtest3
: : ./sqlcprtest3.sh
: : Problem: I got the following output:
: : "Oracle Server Manager Release 3.1.5.0.0 - Production
: : (c) Copyright 1997, Oracle Corporation. All Rights
Reserved.
: : Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
: : With the Partitioning and Java options
: : PL/SQL Release 8.1.5.0.0 - Production
: : SVRMGR> SVRMGR> Connected.
: : SVRMGR> ORACLE instance started.
: : ORA-01012: not logged on
: : SVRMGR> 2> 3> 4> 5> 6> 7>
: : 8> 9> CREATE DATABASE "cprtest3"
: : ORA-01012: not logged on
: : SVRMGR> Disconnected."
: : Workaround: Beats me.
: : 10. sqlplus
: : I attempted to execute sqlplus, but got the following error
: : message:
: : "/u01/app/oracle/product/8.1.5/bin/sqlplus: Permission
: denied."
: : The execute bit was not set.
: : Workaround: I executed:
: : chmod a+x /u01/app/oracle/product/8.1.5/bin/sqlplus
: : sqlplus
: : I gave up for now... there were just too many things wrong
with
: : this installation, starting with the very first command I was
: : supposed to execute (./runInstaller).
: : I can't fathom why Oracle's installation script has so many
: bugs.
: : Am I just doing something terribly wrong?
: : Please help.
null -
Logical operators in Oracle select query
Hello all,
Can i use logical operators in oracle select queries?
for 1 and 0 =0 ; 1 or 0 =0
if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.
Is there any way to use select col1 or col2 from table? where or is a logical operator?
Regards,Hi,
NB wrote:
Hello all,
Can i use logical operators in oracle select queries?Sure; Oracle has the logical operators AND, NOT and OR. All the comparison operators, including >, >=, = !=, EXISTS, IN, IS NULL, LIKE and REGEXP_LIKE are really logical operators, since they return logical values. You can use them in SELECT statements, and other places, too.
for 1 and 0 =0 ; 1 or 0 =0
if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.It's unclear what you want. Maybe you'd be interested in the BITAND function:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions014.htm#sthref1080
BITAND is the only logical function that I know of. Many other functions, especially numberical fucntions such as MOD, have applications in logic.
Is there any way to use select col1 or col2 from table? where or is a logical operator?Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements), and also post the results you want from that data.
Explain how you get those results from that data.
Always say which version of Oracle you're using. -
Strange scenario,Oracle can not display the data in mysql correctly
I use Heterogeneous Service+ODBC to achieve "oracle access mysql"(any other method?),and now i find Oracle can not display the data in mysql correctly:
-------mysql------------
mysql> create table tst(id int,name varchar(10));
Query OK, 0 rows affected (0.00 sec)
mysql> insert into tst values(1,'a');
Query OK, 1 row affected (0.00 sec)
mysql> select * from tst;
------------+
| id | name |
------------+
| 1 | a |
------------+
1 row in set (0.00 sec)
mysql> show create table tst\G
*************************** 1. row ***************************
Table: tst
Create Table: CREATE TABLE `tst` (
`id` int(11) DEFAULT NULL,
`name` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
-------------oracle ------------------
SQL> select count(*) from "tst"@mysql;
COUNT(*)
49
SQL> select * from "tst"@mysql;
id
1
SQL> desc "tst"@mysql;
Name Null? Type
id NUMBER(10)You can make the following query on the result page:
"select * from the_table where movietitle = ? and cinema = ?"
then you set movietitle and cinema to those which the user selected. If the resultset contains more than 0 rows, that means the movie is available.
Below is the sample code, it assumes you have a connection to the database:
PreparedStatement stat = myConnection.prepareStatement("select * from the_table where movietitle = ? and cinema = ?");
stat.setString(1, usersMovieTitleSelection);
stat.setString(2, usersCinemaSelection);
ResultSet res = stat.executeQuery();
if (res.next()) {
out.print("The movie is available");
} else {
out.print("The movie is not available");
}Now just add that to your JSP page. Enjoy ! =) -
SSO to Oracle Forms 6.0 and Oracle Reports 6.0
Hi,
Could somebody please explain how I should implement the SSO so that I can log on a forms application?
Should I use external partner app. ??
How can I parse the right parameters to the forms server ??
thanks,
JeromeHi,
Oracle Forms 6i does not support Advances Security for SQL*Net if this is what your question is. ASO is supported with Forms 9i and above
Frank -
Oracle, Null and empty Strings
Currently I'm facing problems with a class, which contains a String, which
is set to "" (empty String).
When the class is persistent, oracle writes null to the table column
(which seems to be common oracle behaviour) and when retrieving the class,
the field is set to null as well, giving me a lot of null-pointer
exceptions.
Anyway ... I can cope with that (just a lot of extra work)
far worse is the problem, wenn searching objects, that have this field set
to "" oder null.
Oracle can't find the records because JDO creates Querys "where
string=null" or "where string=''" , where oracle expects "where string is
null" to find the records.
Is there a workaround or solution ?Yeah, that would work as well, thx, but since I have to cope with
null-Strings now everywhere in my program, it doesn't hurt just to forbid
empty strings on the program side.
In future times I'll test on Oracle first, then porting to DB/2 - this way
I suppose work is far less to garant compability.
Nevertheless ... having to set the bankcode into quotes is a kodo bug in
my opinion.
Kodo knows the type of classfields (in this case string) and shouldn't
send the parameter as a BigDecimal to the database.
Given that, and having only bankcodes of null (only neccesary when using
Oracle), the method would look like:
public Collection getAccounts (String bankCode)
throws Exception
return getAccounts (Account.class, "bankcode=="+bankcode);
which is how a transparent persistent layer, um, should be , um , I mean
... just transparent ;-D
Marc Prud'hommeaux wrote:
Stefan-
Couldn't you just do something like:
public Collection getAccounts (String bankCode)
throws Exception
String filter;
if (bankCode == null || bankCode.length () == 0)
filter = "(bankCode == null || bankCode == "")";
else
filter = "bankCode == "" + bankCode + """;
return getAccounts (Account.class, filter);
If I understand the problem correctly, this should work for all the
databases.
In article <[email protected]>, Stefan wrote:
What operations are you performing to cause this SQL to be issued? You
say you are having trouble removing objects, but this is clearly not a
DELETE statement. Is this the SQL that is issued when looking up
objects by identity?I'm not removing objects, I was removing just quotes from parameters ;-)
A string column... is it also represented as a string field in your class?Yeah ... just to give you an impression of the code:
First we have a class, representing a bank account:
public class Account {
private AccountMgr myAccountMgr;
private String bankCode;
private String id;
Note, that in nearly all cases bankCode will be a number or null.
I have a second class "AccountMgr", which does all of the persistant stuff
(seaching, making persistent etc.)
This class has two methods, one versatile (protected) to retrieve accounts
by a given filterString and one who just returns accounts by bankCode,
building the expected filterstring. Here is my current working version:
public class AccountMgr {
public Collection getAccounts(String bankCode) throws Exception {
if (bankCode!=null) {
if (bankCode.equals("")) {
throw new Exception("check code, bankCode='' not allowed to get
same behavior from DB2 and Oracle");
// if set, quote the bankCode
bankCode="""+bankCode+""";
return getAccounts(Account.class,"bankCode=="+bankCode);
protected Collection getAccounts(Class accountClass, String filterAdd)
throws Exception {
PersistenceManager pm = MyHelper.getPersistenceManager();
String filter="";
if (filterAdd!=null && !filterAdd.trim().equals("")) {
filter+=filterAdd + " && ";
filter += "myAccountMgr==_accMgr";
Query query = pm.newQuery(accountClass, filter);
query.declareParameters("AccountMgr _accMgr");
return (Collection) query.execute(this);
As you can see, in the first method I have to set the bankCode into
quotes, when it's not null.
This is because otherwise a filter like "bankCode=1234" will be translated
in a way, where 1234 is send as a BigDecimal to the database:
[...] executing statement <4239745>: (SELECT [...] FROM JDO_ACCOUNT t0
WHERE t0.BANKCODE = ? : [reused=1;params={(BigDecimal) 1234}]
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Installation Problem on Pentium4 with ORACLE 8.1.7 Client
I tried to Install the ORACLE Client 8.1.7/8.1.6 on Pentium4 with NT platform. On inserting the CD it gave the first prompt and after Clicking the "INSTALL/DE-INSTALL PRODUCTS", system stops. Checking in the TaskManager helps us to know that 'setup.exe' and 'java.exe' were started for a fraction of the second and then stopped.
Tried to explore the issue and it seems that the JAVA version which ORACLE is using for the INSTALLATION of 8.1.7 is NonCompatible with the P4[NT Platform].
However, 8.0.5/8.0.6 Client version were successfully Installed on the same configuration.
Can Anyone help me out in Installing 8.1.6 on P4[NT base].
Thanks in advanceIs the machine you're trying to install on the
machine your display is running on?
If not, doing a
'xhost + name_of_machine_you_are_installing_on'
on the machine your display is running on should do the
trick.
Hope that helps.
M. Geselle
Maybe you are looking for
-
Following on from the previous problem I had with Error 33331, we moved the application to a new APEX installation. Everything was fine for 30 mintes until we started getting this error :- PLS-00306: wrong number or types of arguments in call to 'SHO
-
[SOLVED] makepkg fails
Hello, I want to create a package out of this: https://aur.archlinux.org/packages.php?ID=34499 However, I receive these error messages: ==> Making package: nvidia-g210m-acpi 0.1.0-2 (Sat Jan 21 11:35:38 CET 2012) ==> Checking runtime dependencies...
-
TS3899 How do you change the number of emails displayed on ios7?
Since I have upgraded my phone to ios7 my phone doesn't display as many emails as it used to. How do I change the settings so that my phone retains more messages?
-
Error when Time field is left empty
Hi: Does anyone know the exact reason for the following error? When I leave the input field of type Time empty I get the below error. It seems to orginate when the time field is being set internally by web dynpro. Thanks for your help. java.lang.Inde
-
Macbook Pro Retina Fan Speed with 3 vs 2 external displays
Hello, When I'm in my home office, I often use my MacBook Pro Retina in Clamshell Mode (in a BookArc) with external displays. Originally, I used 2 external displays (2x 1920x1800), and the fan speed and temperature remained stable at the lowest end o