SQL Plus Bug/Question: 'COMPUTE' command does not work in script.(BUG?!)
Good Day to ALL!
I have a script of SQLPlus that creates a report. I have 8/9 numeric columns which are 'SUM'ed up thru 'COMPUTE' command. It works for all BUT 2 columns. If I put these two columns, compute does not take affect. If I remove these two columns ( just cut) 'COMPUTE' works fine!!! These two coulumns use DB Function. But I have other column that also use DB Function. These two columns has some extra additions. Any thing wrong with the script/column defn.
Thanks - Pradip (Pradip Biswas @Singapore) Could you pl. reply to [email protected]
Here is bit of script. Sorry about the length of the cut and paste.
COLUMN OPEN_QTY_BAL FORMAT 9,99,990 HEADING 'Opening|Qty' Justify LEFT
COLUMN OPEN_QTY_VALUE FORMAT 99,999,990 HEADING 'Opening|S$' Justify LEFT
COLUMN PO_RECEIPTS_QTY FORMAT 99,990 HEADING 'PO Rec|QTY ' Justify LEFT
COLUMN PO_RECEIPTS_QTY_VALUE FORMAT 9,999,990 Heading 'PO Rec|S$' Justify LEFT
COLUMN MISC_RECEIPTS_QTY Format 99,990 Heading 'Misc |Qty' Justify LEFT
Column MISC_RECEIPTS_QTY_VALUE Format 9,999,990 Heading 'Misc|S$' Justify LEFT
COLUMN WORKORDER_QTY FORMAT 99,990 HEADING 'WorkOrd|Qty' Justify LEFT
COLUMN WorkOrder_QTY_VALUE Format 9,999,990 HEADING 'WorkOrd|S$' Justify LEFT
COLUMN SALES_SHIPMENT_QTY FOrmat 99,990 Heading 'SalesShip|Qty' Justify LEFT
COLUMN SALES_SHIPMENT_QTY_VALUE FOrmat 9,999,990 Heading 'SalesShip|S$' Justify LEFT
COLUMN MISC_ISSUE_QTY Format 99,999 HEADing 'Misc|Qty' Justify LEFT
COLUMN MISC_ISSUE_QTY_VALUE Format 9,999,990 heading 'Misc|S$' Justify LEFT
COLUMN TRANSFER_QTY format 99,990 heading 'Transfer|Qty' Justify LEFT
COLUMN TRANSFER_QTY_VALUE format 99,999,990 heading 'Transfer|S$' Justify LEFT
COLUMN REVAL_VALUE Format 99,990 Heading 'Reval|S$' Justify LEFT
COLUMN ON_HAND_QTY FORMAT 9,99,990 HEADING 'Closing|Qty' Justify LEFT
COLUMN ON_HAND_QTY_VALUE FORMAT 99,999,999,990 HEADING 'Closing|S$' Justify LEFT
REPHEADER on
REPHEADER left ' GL Period From: &&P_GL_PERIOD_NAME_FROM ' skip left ' GL Period To : &&P_GL_PERIOD_NAME_TO ' skip left ' Inv Org Code : &&P_INV_ORG_CODE ' skip left 'SubInventory Code : &&P_SUBINVENTORY_CODE ' skip 2
TTITLE left 'H - Inv Inventory Movement Report as at:' TTITLE_DATE RIGHT 'PAGE:' FORMAT 999 SQL.PNO SKIP 2
BTITLE skip 1 CENTER 'COMPANY CONFIDENTIAL - Printed on ' TTITLE_DATE
BREAK on REPORT skip 1;
--rem(1) compute SUM label 'Total' of OPEN_QTY_VALUE PO_RECEIPTS_QTY_VALUE MISC_RECEIPTS_QTY_VALUE WorkOrder_QTY_VALUE SALES_SHIPMENT_QTY_VALUE MISC_ISSUE_QTY_VALUE TRANSFER_QTY_VALUE REVAL_VALUE on report;
--REM(2) compute SUM label 'Total $S: ' of OPEN_QTY_VALUE REVAL_VALUE on report;
--REM(3) compute SUM label 'Total $S: ' of OPEN_QTY_VALUE REVAL_VALUE ON_HAND_QTY_VALUE on report;
compute SUM label 'Total $S:' of OPEN_QTY_VALUE PO_RECEIPTS_QTY_VALUE MISC_RECEIPTS_QTY_VALUE WorkOrder_QTY_VALUE SALES_SHIPMENT_QTY_VALUE MISC_ISSUE_QTY_VALUE TRANSFER_QTY_VALUE REVAL_VALUE on report;
WHENEVER SQLERROR EXIT FAILURE
select
-- MSI.ORGANIZATION_ID ORGANIZATION_ID,
-- MSI.INVENTORY_ITEM_ID INVENTORY_ITEM_ID,
MSI.SEGMENT1||'//'||MSI.DESCRIPTION ITEM,
-- MSI.DESCRIPTION DESCRIPTION,
All_Item_subinv.SUBINVENTORY_CODE SUBINVENTORY,
MSIV.PRIMARY_UOM_CODE UOM,
--NVL(MOQ_OPen_BAL.OPEN_QTY_BAL ,0) OPEN_QTY_BAL ,
-- NVL(MOQ_OPen_BAL.OPEN_QTY_BAL,0) * NVL(AVG_ITEM_COST1.ITEM_COST,0) OPEN_QTY_VALUE,
(MOQ_OPen_BAL( All_Item_subinv.SUBINVENTORY_CODE,
MSI.ORGANIZATION_ID,
MSI.INVENTORY_ITEM_ID,
'&P_GL_PERIOD_NAME_FROM') ) OPEN_QTY_BAL ,
(MOQ_OPen_BAL_VAL( All_Item_subinv.SUBINVENTORY_CODE,
mSI.ORGANIZATION_ID,
MSI.INVENTORY_ITEM_ID,
'&P_GL_PERIOD_NAME_FROM')
) OPEN_QTY_VALUE,
NVL(AGGREGATED_MTT.PO_RECEIPTS_QTY,0) PO_RECEIPTS_QTY,
NVL(AGGREGATED_MTT.PO_RECEIPTS_QTY_VALUE,0) PO_RECEIPTS_QTY_VALUE,
NVL(AGGREGATED_MTT.MISC_RECEIPTS_QTY,0) MISC_RECEIPTS_QTY,
NVL(AGGREGATED_MTT.MISC_RECEIPTS_QTY_VALUE,0) MISC_RECEIPTS_QTY_VALUE,
NVL(AGGREGATED_MTT.WORKORDER_QTY,0) WORKORDER_QTY,
NVL(AGGREGATED_MTT.WorkOrder_QTY_VALUE,0) WorkOrder_QTY_VALUE,
NVL(AGGREGATED_MTT.SALES_SHIPMENT_QTY,0) SALES_SHIPMENT_QTY,
NVL(AGGREGATED_MTT.SALES_SHIPMENT_QTY_VALUE,0) SALES_SHIPMENT_QTY_VALUE,
NVL(AGGREGATED_MTT.MISC_ISSUE_QTY,0) MISC_ISSUE_QTY,
NVL(AGGREGATED_MTT.MISC_ISSUE_QTY_VALUE,0) MISC_ISSUE_QTY_VALUE,
NVL(AGGREGATED_MTT.TRANSFER_QTY,0) TRANSFER_QTY,
NVL(AGGREGATED_MTT.TRANSFER_QTY_VALUE,0) TRANSFER_QTY_VALUE,
NVL(AGGREGATED_MTT.REVAL_VALUE,0) REVAL_VALUE,
(MOQ_OPen_BAL(All_Item_subinv.SUBINVENTORY_CODE,
MSI.ORGANIZATION_ID,
MSI.INVENTORY_ITEM_ID,
'&P_GL_PERIOD_NAME_FROM')
+
nvl(AGGREGATED_MTT.PO_RECEIPTS_QTY,0) +
nvl(AGGREGATED_MTT.MISC_RECEIPTS_QTY,0) +
nvl(AGGREGATED_MTT.WORKORDER_QTY,0) +
nvl(AGGREGATED_MTT.SALES_SHIPMENT_QTY,0) +
nvl(AGGREGATED_MTT.MISC_ISSUE_QTY,0) +
nvl(AGGREGATED_MTT.TRANSFER_QTY,0) ) ON_HAND_QTY,
((MOQ_OPen_BAL_VAL( All_Item_subinv.SUBINVENTORY_CODE,MSI.ORGANIZATION_ID,MSI.INVENTORY_ITEM_ID,'&P_GL_PERIOD_NAME_FROM'))
+(nvl( AGGREGATED_MTT.PO_RECEIPTS_QTY_VALUE,0) )
+(nvl( AGGREGATED_MTT.MISC_RECEIPTS_QTY_VALUE,0) )
+(nvl( AGGREGATED_MTT.WorkOrder_QTY_VALUE,0) )
+(nvl( AGGREGATED_MTT.sALES_SHIPMENT_QTY_VALUE,0) )
+(nvl( AGGREGATED_MTT.MISC_ISSUE_QTY_VALUE,0) )
+(nvl( AGGREGATED_MTT.TRANSFER_QTY_VALUE,0) )
+nvl( AGGREGATED_MTT.REVAL_VALUE,0)) ON_HAND_QTY_VALUE -- column alias
FROM
-- In line View for MSI
(select distinct MMT.ORGANIZATION_ID, MMT.INVENTORY_ITEM_ID, MMT.SUBINVENTORY_CODE
From MTL_MATERIAL_TRANSACTIONS MMT,
ORG_ORGANIZATION_DEFINITIONS OOD,
MTL_ONHAND_QUANTITIES moq
where
OOD.organization_code = '&P_INV_ORG_CODE' --'HS' --'&P_INV_ORG_CODE'
AND OOD.inventory_enabled_flag = 'Y'
AND OOD.operating_unit = fnd_profile.value('ORG_ID') --83 --fnd_profile.value('ORG_ID')
AND OOD.SET_OF_BOOKS_ID = fnd_profile.value('GL_SET_OF_BKS_ID') --1 --fnd_profile.value('GL_SET_OF_BKS_ID')
AND MMT.ORGANIZATION_ID = OOD.organization_id
AND MMT.SUBINVENTORY_CODE = NVL('&P_SUBINVENTORY_CODE', MMT.SUBINVENTORY_CODE)
and MMT.ORGANIZATION_ID = MOQ.ORGANIZATION_ID -- to eliminate consigend items:2007Jan04:PKB
and MMT.INVENTORY_ITEM_ID = MOQ.INVENTORY_ITEM_ID --,,
and MMT.SUBINVENTORY_CODE = MOQ.SUBINVENTORY_CODE --,,
UNION
Select distinct MOQ.ORGANIZATION_ID, MOQ.INVENTORY_ITEM_ID, MOQ.SUBINVENTORY_CODE
from MTL_ONHAND_QUANTITIES MOQ,
ORG_ORGANIZATION_DEFINITIONS OOD2
WHERE
OOD2.organization_code = '&P_INV_ORG_CODE' --'HS' --'&P_INV_ORG_CODE'
AND OOD2.inventory_enabled_flag = 'Y'
AND OOD2.operating_unit = fnd_profile.value('ORG_ID') --83 --fnd_profile.value('ORG_ID')
AND OOD2.SET_OF_BOOKS_ID = fnd_profile.value('GL_SET_OF_BKS_ID') --1 --fnd_profile.value('GL_SET_OF_BKS_ID')
AND moq.ORGANIZATION_ID = OOD2.organization_id
AND moq.SUBINVENTORY_CODE = NVL('&P_SUBINVENTORY_CODE', moq.SUBINVENTORY_CODE)
) ALL_Item_SUBInv,
MTL_SYSTEM_ITEMS_B MSI,
Mtl_System_Items_Vl MSIV,
(SELECT
MMT.ORGANIZATION_ID ORGANIZATION_ID,
MMT.INVENTORY_ITEM_ID INVENTORY_ITEM_ID,
MMT.SUBINVENTORY_CODE SUBINVENTORY_CODE,
-- PO RECEIPTS.
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
('Purchase order')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('PO Receipt','PO Rcpt Adjust','Return to Vendor')
THEN
--MMT.TRANSACTION_QUANTITY
mmt.primary_quantity
ELSE 0
END
ELSE 0
END ) PO_RECEIPTS_QTY,
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
('Purchase order')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('PO Receipt','PO Rcpt Adjust','Return to Vendor')
THEN
NVL(MMT.ACTUAL_COST,0)* nvl(mmt.primary_quantity,0)
MMT.TRANSACTION_COST * NVL(AVG_ITEM_COST.ITEM_COST,0)
ELSE 0
END
ELSE 0
END ) PO_RECEIPTS_QTY_VALUE,
-- MISC RECEIPTS.
SUM( CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
('Account','Inventory')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Account receipt','Miscellaneous receipt')
THEN
--MMT.TRANSACTION_QUANTITY
mmt.primary_quantity
ELSE 0
END
ELSE 0
END ) MISC_RECEIPTS_QTY,
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
('Account', 'Inventory')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Account receipt','Miscellaneous receipt')
THEN
NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
ELSE 0
END
ELSE 0
END ) MISC_RECEIPTS_QTY_VALUE,
-- WorkOrder Qty and S$
SUM( CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
('Job or Schedule')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('WIP Assembly Return','WIP Assy Completion','WIP component issue','WIP Component Return')
THEN
--MMT.TRANSACTION_QUANTITY
mmt.primary_quantity
ELSE 0
END
ELSE 0
END ) WORKORDER_QTY,
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
('Job or Schedule')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('WIP Assembly Return','WIP Assy Completion','WIP component issue','WIP Component Return')
THEN
NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
ELSE 0
END
ELSE 0
END ) WorkOrder_QTY_VALUE,
-- Sales Shipment
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
( 'Sales order','RMA')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Sales order issue','Sales Order Pick','RMA Return','RMA Receipt')
THEN
--MMT.TRANSACTION_QUANTITY
mmt.primary_quantity
ELSE 0
END
ELSE 0
END ) SALES_SHIPMENT_QTY,
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
( 'Sales order','RMA')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Sales order issue','Sales Order Pick','RMA Return','RMA Receipt')
THEN
NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
ELSE 0
END
ELSE 0
END ) SALES_SHIPMENT_QTY_VALUE,
-- MISC ISSUE
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
('Inventory','Account' )
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Miscellaneous issue','Account issue')
THEN
--MMT.TRANSACTION_QUANTITY
mmt.primary_quantity
ELSE 0
END
ELSE 0
END ) MISC_ISSUE_QTY,
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
('Inventory','Account' )
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Miscellaneous issue','Account issue')
THEN
NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
ELSE 0
END
ELSE 0
END ) MISC_ISSUE_QTY_VALUE,
-- Transfers
SUM( CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
( 'Inventory' )
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Subinventory Transfer')
THEN
--MMT.TRANSACTION_QUANTITY
mmt.primary_quantity
ELSE 0
END
ELSE 0
END ) TRANSFER_QTY,
SUM( CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
( 'Inventory')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Subinventory Transfer')
THEN NVL(MMT.ACTUAL_COST,0) * nvl(mmt.primary_quantity,0)
MMT.TRANSACTION_COST NVL(AVG_ITEM_COST.ITEM_COST,0)
ELSE 0
END
ELSE 0
END ) TRANSFER_QTY_VALUE,
-- Adjustment to Cost (Revaluation)
SUM(CASE
WHEN MTST.TRANSACTION_SOURCE_TYPE_NAME in
( 'Standard cost update','Job or Schedule')
THEN
CASE
WHEN MTT.TRANSACTION_TYPE_NAME in
('Standard cost update','WIP cost update')
THEN
--2007JAN03:PKB MMT.TRANSACTION_COST
MMT.TRANSACTION_COST* MMT.QUANTITY_ADJUSTED
ELSE 0
END
ELSE 0
END ) REVAL_VALUE
FROM
MTL_MATERIAL_TRANSACTIONS MMT,
--GL_PERIODS GP,
MTL_TRANSACTION_TYPES MTT,
MTL_TXN_SOURCE_TYPES MTST,
ORG_ORGANIZATION_DEFINITIONS OOD
WHERE
OOD.organization_code = '&P_INV_ORG_CODE' --'HS' --'&P_INV_ORG_CODE'
AND OOD.inventory_enabled_flag = 'Y'
AND OOD.operating_unit = fnd_profile.value('ORG_ID') --83 --fnd_profile.value('ORG_ID')
AND OOD.SET_OF_BOOKS_ID = fnd_profile.value('GL_SET_OF_BKS_ID') --1 --fnd_profile.value('GL_SET_OF_BKS_ID')
AND MMT.ORGANIZATION_ID = OOD.organization_id
AND MMT.SUBINVENTORY_CODE = NVL('&P_SUBINVENTORY_CODE', MMT.SUBINVENTORY_CODE)
-- AND GP.PERIOD_SET_NAME = 'HF-ACCTG-CAL' -- Hardcoded PKB
AND
( (EXISTS
( select GP.Period_name
FROM GL_PERIODS GP
where TO_DATE(TO_CHAR(MMT.TRANSACTION_DATE,'DD-MM-YYYY'),'DD-MM-YYYY')
>= TO_DATE(TO_CHAR(GP.START_DATE,'DD-MM-YYYY'),'DD-MM-YYYY') --Between GP.START_DATE and GP.END_DATE
AND GP.PERIOD_NAME = '&P_GL_PERIOD_NAME_FROM'
and GP.PERIOD_SET_NAME = 'HF-ACCTG-CAL'
AND NVL('&P_GL_PERIOD_NAME_FROM','ALL') != 'ALL'
OR (NVL('&P_GL_PERIOD_NAME_FROM' ,'ALL') = 'ALL')
AND
( (EXISTS
( select GP.Period_name
FROM GL_PERIODS GP
where TO_DATE(TO_CHAR(MMT.TRANSACTION_DATE,'DD-MM-YYYY'),'DD-MM-YYYY')
<= TO_DATE(TO_CHAR(GP.END_DATE,'DD-MM-YYYY'),'DD-MM-YYYY')
AND GP.PERIOD_NAME = '&P_GL_PERIOD_NAME_TO'
and GP.PERIOD_SET_NAME = 'HF-ACCTG-CAL'
AND NVL('&P_GL_PERIOD_NAME_TO','ALL') != 'ALL'
OR (NVL('&P_GL_PERIOD_NAME_TO','ALL') = 'ALL')
AND MMT.TRANSACTION_TYPE_ID = MTT.TRANSACTION_TYPE_ID
AND MMT.TRANSACTION_SOURCE_TYPE_ID = MTST.TRANSACTION_SOURCE_TYPE_ID
group by
MMT.ORGANIZATION_ID,
MMT.INVENTORY_ITEM_ID,
MMT.SUBINVENTORY_CODE
) AGGREGATED_MTT,
-- Inline Table for AVG_ITEM_COSTs 2nd time,
(SELECT
CIC.ORGANIZATION_ID ORGANIZATION_ID,
CIC.INVENTORY_ITEM_ID INVENTORY_ITEM_ID,
CIC.COST_TYPE_ID COST_TYPE_ID,
CCT.COST_TYPE COST_TYPE,
NVL(CIC.ITEM_COST ,0) ITEM_COST
FROM
CST_ITEM_COSTS CIC,
CST_COST_TYPES ccT,
ORG_ORGANIZATION_DEFINITIONS OOD1
WHERE
CCT.COST_TYPE_ID = CIC.COST_TYPE_ID
/*AND (
(CCT.COST_TYPE = 'Average' and '&P_INV_ORG_CODE' = 'HS')
OR
(CCT.COST_TYPE = 'Frozen' and '&P_INV_ORG_CODE' = 'HL')
AND CCT.COST_TYPE_ID =
( select m.primary_cost_method
from mtl_parameters m
where m.organization_id = OOD1.ORGANIZATION_ID
and OOD1.organization_code = '&P_INV_ORG_CODE' --'HS' --'&P_INV_ORG_CODE'
AND OOD1.inventory_enabled_flag = 'Y'
AND OOD1.operating_unit = fnd_profile.value('ORG_ID') 83 --fnd_profile.value('ORG_ID')
AND OOD1.SET_OF_BOOKS_ID = fnd_profile.value('GL_SET_OF_BKS_ID') 1 --fnd_profile.value('GL_SET_OF_BKS_ID')
AND cic.ORGANIZATION_ID = OOD1.organization_id
) AVG_ITEM_COST1
WHERE
AGGREGATED_MTT.ORGANIZATION_ID(+) = All_Item_subinv.ORGANIZATION_ID
AND AGGREGATED_MTT.INVENTORY_ITEM_ID(+) = All_Item_subinv.INVENTORY_ITEM_ID
AND AGGREGATED_MTT.subinventory_code(+) = All_Item_subinv.subinventory_code
AND All_Item_subinv.ORGANIZATION_ID = MSI.ORGANIZATION_ID
AND ALL_Item_SUBInv.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
AND AVG_ITEM_COST1.ORGANIZATION_ID(+) = MSI.ORGANIZATION_ID
AND AVG_ITEM_COST1.INVENTORY_ITEM_ID(+) = MSI.INVENTORY_ITEM_ID
and msi.ROWID = MSIV.ROW_ID
and msi.ORGANIZATION_ID = fnd_profile.value('ORG_ID') --83 --fnd_profile.value('ORG_ID')
and sysdate between NVL(msi.start_date_active,sysdate -1 )
and NVL(msi.end_date_active,sysdate+1)
Order BY
MSI.SEGMENT1,
MSI.DESCRIPTION ,
All_Item_subinv.SUBINVENTORY_CODE
/
Hi Barry and All: This indeed is a bug in SQLPLUS ! Version 9.2.0.1.0 as well.
Thanks for asking the version no of SQLLPLUs. I was working thru Oracle Apps 11i.10 (concurrent program). So I did not get any message from SQLPLUS.
I tested independently in SQLPLUS and got the message! Thanks Oracle!!!
The Bug is in the name of COLUMN NAME or ALIAS Name. I renamed the columns from ON_HAND_QTY and ON_HAND_VALUE to CLOSE_QTY and CLOSE_QTY_VALUE. It worked!! The string 'ON' in the column/alias name is taken as 'ON' keyword/clause for 'compute' statement for SQLPLUS.
Here is the message from SQLPLUS
" SP2-0084: COMPUTE ON keyword specified already"
See these two line and compare
--compute SUM label 'Total $S: ' of SALARY ON_SALARY on report;
compute SUM label 'Total $S: ' of SALARY on report;
Thanks - Pradip
Here is the sample code to simulate. (not Big :))
WHENEVER SQLERROR EXIT FAILURE
CLEAR computes
CLEAR BREAKS
clear column
TTITLE OFF
BTITLE OFF
set verify off
set feedback off
set echo off
set heading off
set termout off
set linesize 203
set pagesize 30
set termout on
SET UNDERLINE =
set heading on
COLUMN SALARY FORMAT 9,999,990 Heading 'SALARY'
COLUMN ON_SALARY format 9,999,990 Heading 'ON Salary'
column ENAME format a20 heading 'NAME'
COLUMN EMPNO Format 99999 HEADING 'EMPNO'
BREAK on REPORT skip 3;
--compute SUM label 'Total $S: ' of SALARY ON_SALARY on report;
compute SUM label 'Total $S: ' of SALARY on report;
WHENEVER SQLERROR EXIT FAILURE
select empno, ename, sal SALARY, sal ON_SALARY from scott.emp;
Similar Messages
-
SQL*Plus COPY command does not work
SQL*Plus COPY command does not work in SQL Developer. I am using SQL Developer 1.5.1 on Windows XP.
copy from <source_db_connection> to <target_db_connection> create <target_tab_name> using select * from <source_tab_name>
Does it work on different versions of SQL Developer ?
Anyone had any success in trying COPY command in SQL Developer?
Thanks in advance.While it hasn't been updated for v1.5, this page lists the supported SQL*Plus commands. COPY is explicitly listed as not supported.
theFurryOne -
I have a MacBookPro 2011. The Empty Trash command does not work. I mean I can not empty my trash. what should I do? since now there are more than 5000 items accumulated in my trash.
Thanks everybody for your comments.
I just found a way out from the disscussion : I can't use empty trash or secure empty trash.
The same formula proposed by Zyriab solved my question.
This solved my questionRe: I can't use empty trash or secure empty trash. -
Recently upgraded to a new iMac running 10.9.4. Printing works well from this computer and all other devices (iPad, iPhone, etc.). However, the "scan to computer" function does not work. In the "Scan" section of HP Utility when I click on "Scan to Computer" the error message reads "Scan to Computer Cannot Be Enabled. The software required for Scan to Computer could not be located on this computer. Please download and install the latest HP recommended software for your device from http://www.hp.com/support, and then try again.
Of course I have done this... twice... still no luck. Also ran Software Update and there was an update, but it made no difference.Yes, did all that... in order. It did not resolve the problem. However, I did find what appears to be the answer. After re-installing the driver software DO NOT immediately follow the prescribed steps. Instead, quit the installer, restart the Mac, and an Apple software update will appear after restart. Install that software update, and even though the computer and software do not call for it, restart the Mac again. Only then add the printer and follow the balance of the steps. It works! Thank you for your help.
-
delete command does not work.. it just freezes neither roll back happens.. please advice
Always: If possible, give the exact command & output from your terminal, pefrerrable with copy & paste. We cannot see your screen and magically spot the problem.
In general, you should also include your database version and OS, although I doubt that this is relevant in this particular case.
Kind regards
Uwe Hesse
http://uhesse.wordpress.com -
My "undo" command does not work in the new version of GB. Please advise. This is a real problem. I had no issues with GB from iLife 11.
Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
Apple's iWork suite (Pages, Numbers, and Keynote.)
Open Office (Office 2007-like suite compatible with OS X.)
NeoOffice (similar to Open Office.)
LibreOffice (a new direction for the Open Office suite.) -
"FOR REC IN CURSOR(PARAMETERS) LOOP" command does not work. Why?
Hi to all.
It's a pleasure to receive your help.
In "FOR REC IN CURSOR(PARAMETERS) LOOP" command although the query return value does not enter the loop.
Sounds simple, but I'm not seeing the flaw...
Suggestions?
Version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
Thank in advance,
FilippeFilippe Soares Roza wrote:
Hi to all.
It's a pleasure to receive your help.
In "FOR REC IN CURSOR(PARAMETERS) LOOP" command although the query return value does not enter the loop.
Sounds simple, but I'm not seeing the flaw...
Suggestions?
Version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
Thank in advance,
Filippe
see a picture of my car that does not work.
Tell me how to make my car go.
How do I ask a question on the forums?
SQL and PL/SQL FAQ -
SQL-Tokenizer based on regular-expressions does not work
I'm on 10gR2
Following SQL-Tokenizer converts string :str to rows using :delim as the delimiter-char (:str and :delim are parameters):
select level, regexp_replace(regexp_substr( :in_str || :in_delimiter, '(.*?)' || :in_delimiter, 1, level ), :in_delimiter, '') as token
from dual
connect by regexp_instr( :in_str || :in_delimiter, '(.*?)' || :in_delimiter, 1, level ) > 0
order by level asc ;
When using the pipe-symbol "|" as the delimiter, it doesn't work; the rows are processed, but the tokens are null. Using an other char as delimiter (e.g. ";") works fine.
:str = "123;456;A1;67X;0;-8" & :delim = ";" => works fine
:str = "123|456|A1|67X|0|-8" & :delim = "|" => does not work
I think the bug is in the regexp-parameter for the pattern, isn't it?
Why doesn't work the pipe-symbol as delimiter?
Can anybody give me a hint for using the correct regexp-pattern?
thx
Nuerniselect level, rtrim(regexp_substr( :in_str || :in_delimiter, '(.*?)' || :in_delimiter, 1, level ),:in_delimiter ) as token
from dual
connect by regexp_instr( :in_str || :in_delimiter, '(.*?)' || :in_delimiter, 1, level ) > 0
order by level asc ;use a rtrim instead of regexp_replace then it works...
Ravi Kumar -
Zen Stone Plus 4GB - Automatic Shutdown - IT DOES NOT WORK
:Zen Stone Plus 4GB - Automatic Shutdown - IT DOES NOT WORKVHello!
I do possess this MP3 Player (with integrated speakers) for more than 2 years now and have never been using the Automatic Shutdown function of the player (in the menu settings). Yesterday, I went to bed, wanted to listen to some music and tried out this function the first time, but it did not work. I tried it with 5, 0 and 30 minutes. What am I doing wrong or is this setting just a joke?
I am using the current software/firmware and am not a newbie to technical instruments so I do know how to - theoretically - start this function by going to setting - Automatic Shutdown - scrolling to the minutes I want to have - Enter/Confirm with the middle ball-knob at the front of the player.
Maybe some of you might help me, I would highly appreciate that.
Kind regards
GuyfromgermanyHi JLM, am running .0.05e fine and in fact listening to it at the moment. Is there anyway you can regress back to .0.03 to test your theory? Testing a bunch of 28k CBR MP3s is an easy thing to try also.Message Edited by BlueRobin on 0-02-200802:49 PM
-
BUG: Oracle Schema Processor does not work in Servlets
We found a bug with Oracle's Schema Processor. It does not work in Servlets.
When we try to validate a XML document in a Servlet it does not work, but we can execute the same code in a stand alone application and it works.
The following is the code we are using:
try {
File f =new File(filename);
FileReader r = new FileReader(f);
DOMParser dp = new DOMParser();
URL url = createURL (filename);
dp.setValidationMode(false);
dp.setSchemaValidationMode(true);
dp.setPreserveWhitespace(true);
dp.parse(url);
System.out.println("it is parsed");
} catch(Exception e){System.out.println("there is Error"+e.getMessage());}
nullI don't think this is related to Servlets per se.
Check that the Schema processor classes used by the servlet container, and your application are the same.
Java does not have proper versioning of classes, I have seen many applications collapse. People compiled their code on developer machines, where it worked fine, but when moved to a production machine they failed because the production machine had a different version of classes. Usually the name of the class doesn't change, but either a method or a variable is missing in several classes. VM doesn't complain but simply crashes.
In your Schema Processor classes that are used by the servlet engine might be different from the one that the app uses. Do a search on the file system to see how many copy of the same class bundle (zip, jar) you have on the system. -
Hi,
I changed some Applescripts over to InDesign CS5 from CS3 and now they do not work. Basically all the Applescript does is place a graphic in a rectangle and size it to fit. The problem is that I keep getting an error that says, ...
Adobe InDesign CS5 got an error: "Macintosh HD:Users:User:Desktop:untitled folder:1023SW.tif" doesn’t understand the place message.
I get the exact same error when I run the "Image Catalogue" script that came with Adobe InDesign CS5. The script does everything but place the image. It works just fine in CS3.
Can anyone please help me with this? A sample of the script is below. This is the one that comes with CS5 but it does not work
set myFile to item myCounter of myFiles
set myRectangle to rectangle myCounter of myDocument
tell myRectangle
set myGraphic to place (myFile as string)
--The place command returns a list, so get the
--first item of the list.
set myGraphic to item 1 of myGraphic
set label to myFile as string
if myFitProportional is true then
fit given proportionally
end if
if myFitCenterContent is true then
fit given center content
end if
if myFitFrameToContent is true then
fit given frame to content
end if
end tell
Any help would be appreciated.OK, I figured it out also.
In case anybody out there is having the same problem, this is the line of code I used:
set myGraphic to place (myArtFile as alias)
So I just changed "as string" to "as alias" and it worked. -
Switching browser using IE tab plus - the Norton Identity Safe does not work
Using Firefox 4.0.1 and Norton 360 5.1.0.29 - which has recently been "fixed" to work together (by Norton).
When using IE Tab Plus to switch rendering engines (Firefox to IE) the Norton Identity Safe does not work by not pre filling user names and passwords to sites that are registered in the Norton Safe and also for any new sites does not offer the option to add a new site to the Norton safe . . . . . is this a Norton or Firefox or IE Tab issue? And has anyone else had this problem?Symantec need to update their Firefox add-ons so that they are compatible with Firefox 4. They have indicated that for Norton 360 they plan to release an update to Norton 360 to support Firefox 4 in early May - http://us.norton.com/support/kb/web_view.jsp?wv_type=public_web&docurl=20100720113635EN&ln=en_US
I do not know about the time scale for updates for other Norton products. Pending the update by Symantec, if you want to use the Norton add-ons you will need to downgrade to Firefox 3.6.
To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data.
You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your current bookmarks, passwords etc.
To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of installed extensions, checking their compatibility, and reset toolbar customizations.
For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles -
Screen Mirroring does not work, full of bugs.
Hi,
I've had a Sony Z1 for well over six months now and have got a Sony Bravia TV that supports mircast screen mirroring. When I purchased the Z1 it was on android 4.2 and the screen mirroring worked a treat, it was lag free, always responsive etc.
But when I upgraded to 4.3, the mirroring was buggy as **bleep**, the device always disconnected, when it did connect after several attempts it would lag, black out, then disconnect again. I've tried fiddling with wifi settings as well as wifi direct etc. but no joy and I left it as that.
When I knew 4.4 kitkat was coming to the z1 I waited as I would assume the issue would be fixed, but I upgraded to 4.4 (build: 14.3.A.0.757) today and is still full of these disconnecting and unresponsive bugs. I'm not sure what the problem is, I mirrored a samsung s4 mini and works absolutely fine (4.2) and I can mirror my sony xperia tablet z (4.3) with no issues either. I know a relative who also owns the z1 and has exactly the same issue, what also seems to happen now and then, is that half way through a mirrored session, the wifi would disable and will switch to the mobile network, then after some time, back to wifi again; yet this never happened on 4.2?
Is there a fix or a way to solve these issues? It's rather annoying having such a great feature that doesn't want to work on a flagship.
Thanks.I had some issues with Miracast on my Z1 but with 4.2 and 4.3 firmware. It was loosing connection or kept saying that I don't have HDCP. I was connecting using Netgear Push2TV.
On 4.4 (.757) it works quite stable. On Z1C with 4.3 I wasn't able to miracast at all.
The same goes with screen mirroring to Z2 tablet. Works fine from Z1 to Z2 (both KitKat, altough one touch pairing is a disaster and not working at all), but you can forget about it using Z1C and Android 4.3.
Best regards,
Sergio PL
Xperia Z1 / Nexus 7 (2012) -
One SQL/PLSQL query out of several does not work
I have a report with search filters and most of the search fields are text fields. I have no problem searching by these fields until i add in a select list to search by. Once i apply the select list filter(:P21_COUNTY), it displays the correct information but then all the text fields stop displaying the correct info. Does it work differently if using a select list vs. other field types? Thanks, Deanna
There is a sample app on apex.oracle.com
Workspace:DEANNA2
Username:[email protected]
Password:Dclipse03
Page 21
Login:[email protected]
Password:Dclipse03Looks like a Application express Question
Post it [Here | http://forums.oracle.com/forums/forum.jspa?forumID=137]
SS -
Bug Report: Hotzone navigation does not work at the end of a flattened article
I was writing about this earlier but I think it did not catch on.
I experience problems when using Hot zones in my custom viewer together with flatteened articles. when I reach the end of a flattened article, tapping the hotzone does not advance to the next article. this also happens at the first page of the flattened article when I try to get to the previous article.
—JohannesIn case you do not know...
If you want to limit css to specific sites you can do, e.g.
<pre>@-moz-document url-prefix(http://www.example.com/example_dir/)
css for this site/directory
}</pre>
(There are other varieties of this construction too.
Even easier is to use the Stylish addon.
https://addons.mozilla.org/en-US/firefox/addon/2108/
Maybe you are looking for
-
I do not see the files you've uploaded to the cloud. Is there any solution?
-
Shutdown due to a problem on every reboot
Hi, I'm on OSX 10.10 on a 13" MacBook Pro retina and since some days I get a note on every bootup claiming the computer shutdown due to a problem and if I want to open windows. But I just shutdown the computer by "Menu -> Shutdown". Why is this happe
-
Unable to recognize document as valid XSDCheck the selected category
w.r.t the thread below, any solution expert.. Unable to convert imported document to WSDL --- PI 7.1 in Pi 7.0 XSD is working perfectly... in XML spy its not showing any error. but when i want to upload in 7.1 its giving errror like Unable to c
-
I tried to download tI tried to download iOS 7.0.4 and have been stuck on a screen with iTunes logo and up arrow and a picture of charger plug. It has been this way for 2 hours. Help??
-
How well does OSX Yosemite run on a Mid 2007 iMac?
I own a Mid 2007 iMac with 4GB 667Mhz DDR2 RAM, Intel Core 2 Duo 2.0Ghz processor and has ATI Radeon HD 2400 XT 128 MB graphics. I was considering upgrading from OSX Mavericks 10.9.4 to OSX Yosemite, but fear it may slow the Mac down. If anybody has