ORA-01722: number not valid only in where clause
I'm getting ORA-01722: invalid number when you use to_number in where clause:select to_number(txt_field) from tbl where 100>=to_number(txt_field);
I don't get it without where clause (300 rows returned):select to_number(txt_field) from tbl;
No logical explanation?Published by: totalnewby on February 21, 2012 04:54
totalnewby wrote:
No logical explanation?
Let me guess - tbl is actually a point of view:
SQL> create table tbl(code varchar2(10),val varchar2(10));
Table created.
SQL> insert into tbl values('string','abc');
1 row created.
SQL> insert into tbl values('number','123');
1 row created.
SQL> create or replace
2 view tbl_vw
3 as
4 select *
5 from tbl
6 where code = 'number'
7 /
View created.
SQL> select to_number(val)
2 from tbl_vw
3 /
TO_NUMBER(VAL)
--------------
123
SQL> select to_number(code)
2 from tbl_vw
3 where to_number(val) > 100
4 /
select to_number(code)
*
ERROR at line 1:
ORA-01722: invalid number
SQL>
Reason is first selection from the first filters view (find out where clause) out of the non-numeric values and then only apply to_number. When the second select is run optimizer merges the view definition and where would adopt becomes:
where where code = 'number '.
and to_number (val) > 100
Since there is no order of predicate, it happens that to_number (val) > 100 is applied first, and he obviously fails.
SY.
Tags: Database
Similar Questions
-
ORA-01001: cursor not valid error
Cursor UNA is throwing this error... ORA-01001: cursor not valid error
Can you please please help me find the problem.
Published by: 831050 July 20, 2011 06:50CREATE OR REPLACE TRIGGER LOT_DBA.CR_FIELD_CUT_AFTER_INSERT AFTER INSERT ON LOT_DBA.CR_FIELD_CUT_STAGING REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW DECLARE stmt_var VARCHAR2(50); err_msg VARCHAR2(250); conn UTL_SMTP.CONNECTION; crlf VARCHAR2(2) := CHR(13) || CHR(10); mesg VARCHAR2(2000); --cc_recipient VARCHAR2(50) DEFAULT '[email protected]'; cc_recipient VARCHAR2(50) DEFAULT '[email protected]';--6/24 msg_body VARCHAR2(200) := 'Please check CR_FIELD_ERROR Table for Details. '; systime DATE; V_CCI VARCHAR2(50) DEFAULT '[email protected]';-- 07/27/2010 Added Contractor Name for CT 2010-4071 CURSOR CUT (pl_no VARCHAR2) IS SELECT layout_no FROM CR_FIELD_CUT_SHEET WHERE LAYOUT_NO = pl_no; cut_cur CUT%ROWTYPE; CURSOR LOT (pl_no VARCHAR2) IS SELECT layout_no,contractor_name -- 07/27/2010 Added Contractor Name for CT 2010-4071 FROM CR_LAYOUT_TRACKING WHERE LAYOUT_NO = pl_no; lot_cur LOT%ROWTYPE; CURSOR DET (pl_no VARCHAR2) IS SELECT layout_no, cut_no FROM CR_FIELD_CUT_DETAIL WHERE LAYOUT_NO = pl_no; det_cur DET%ROWTYPE; CURSOR DTN (pl_no VARCHAR2, pl_ct NUMBER, pl_nt VARCHAR2) IS SELECT layout_no, cut_no FROM CR_FIELD_CUT_DETAIL WHERE LAYOUT_NO = pl_no AND CUT_NO = pl_ct AND NVL(NOTE,'XXXXXXXXX') = pl_nt; dtn_cur DET%ROWTYPE; CURSOR ITM (pl_no VARCHAR2) IS SELECT layout_no, cut_no, seq_no FROM CR_FIELD_CUT_ITEM WHERE LAYOUT_NO = pl_no; itm_cur ITM%ROWTYPE; CURSOR STAT (pl_no CHAR) IS SELECT MAX(create_date) cdate FROM CR_FIELD_LAYOUT_STATUS WHERE LAYOUT_NO = pl_no AND STATUS = 'AWAITING_COMPLETION'; stat_cur STAT%ROWTYPE; CURSOR UNA (pl_no VARCHAR2, pa_no VARCHAR2) IS SELECT layout_no, account_no FROM CR_ACCOUNTS WHERE LAYOUT_NO = pl_no AND ACCOUNT_NO = pa_no;--added for cha 2011-3172 6/14/2011 una_cur UNA%ROWTYPE;--added for cha 2011-3172 6/14/2011 BEGIN systime := SYSDATE; /* If the record being inserted in the staging table does not exist in the core table, the record is inserted in the core table. However, if it exists, then the record in the core table is deleted and then inserted. */ /* Delete items, then cut details, and finally cut sheet respectively so as not to raise the foreign key constraint */ --------------- -- Cut Items -- --------------- OPEN ITM(:NEW.LAYOUT_NO); FETCH ITM INTO itm_cur; IF ITM%FOUND THEN DELETE FROM CR_FIELD_CUT_ITEM WHERE LAYOUT_NO = :NEW.LAYOUT_NO AND NVL(NOTE,'XXXXXXXXX') <> :NEW.NOTE; stmt_var := 'Delete Cut Items'; END IF; ----------------- -- Cut Details -- ----------------- OPEN DET(:NEW.LAYOUT_NO); FETCH DET INTO det_cur; IF DET%FOUND THEN DELETE FROM CR_FIELD_CUT_DETAIL WHERE LAYOUT_NO = :NEW.LAYOUT_NO AND NVL(NOTE,'XXXXXXXXX') <> :NEW.NOTE; stmt_var := 'Delete Cut Detail'; END IF; --------------- -- Cut Sheet -- --------------- OPEN CUT(:NEW.LAYOUT_NO); FETCH CUT INTO cut_cur; IF CUT%FOUND THEN DELETE FROM CR_FIELD_CUT_SHEET WHERE LAYOUT_NO = :NEW.LAYOUT_NO ; stmt_var := 'Delete Cut Sheet'; END IF; --------------- -- Layout Tracking -- Moved it from below for Change Track 2010-4071 (OpenedByContractor). --------------- OPEN LOT(:NEW.LAYOUT_NO); FETCH LOT INTO lot_cur; /* This updates the table CR_LAYOUT_TRACKING's columns House Number into the new value set by the staging table. */ IF LOT%FOUND THEN UPDATE CR_LAYOUT_TRACKING SET HOUSE_NUMBER = :NEW.HOUSE_NUMBER WHERE LAYOUT_NO = lot_cur.LAYOUT_NO; stmt_var := 'Update Layout Tracking'; END IF; /* Insert record from staging table to Cut Sheet Table the complete_status is set to No. ('N')*/ BEGIN INSERT INTO CR_FIELD_CUT_SHEET (LAYOUT_NO , PERMIT_TYPE , SAWCUT , PLATED , COUNTY , STATE , WEST_MAP_ID , OPENED_BY_CONTR , PROTECTED_ST , COMPASS_POINT , STREET_NAME , ARTERY_TYPE , LEFT_CROSS_STREET , RIGHT_CROSS_STREET , SPECIFIC_LOC , EMER_PERMIT_NO , EMER_ISSUE_DATE , SERVICE_TYPE , PARKING_RESTR , RESTORE_REQD , CREATE_DATE , CREATE_BY , NOTE , COMPLETE_STATUS , EDIT_FINAL) VALUES (:NEW.LAYOUT_NO , :NEW.PERMIT_TYPE , :NEW.SAWCUT , :NEW.PLATED , :NEW.COUNTY , :NEW.STATE , :NEW.WEST_MAP_ID , lot_cur.contractor_name , -- Get contractor Name from cr_layout_tracking :NEW.PROTECTED_ST , :NEW.COMPASS_POINT , :NEW.STREET_NAME , :NEW.ARTERY_TYPE , :NEW.LEFT_CROSS_STREET , :NEW.RIGHT_CROSS_STREET , :NEW.SPECIFIC_LOC , :NEW.EMER_PERMIT_NO , :NEW.EMER_ISSUE_DATE , :NEW.SERVICE_TYPE , :NEW.PARKING_RESTR , :NEW.RESTORE_REQD , systime , :NEW.CREATE_BY , :NEW.NOTE , 'N' , :NEW.STATUS ); stmt_var := 'Insert Cut Sheet'; EXCEPTION WHEN DUP_VAL_ON_INDEX THEN NULL; END; --------------------- -- Cut Details New -- --------------------- OPEN DTN(:NEW.LAYOUT_NO, :NEW.CUT_NO, :NEW.NOTE); FETCH DTN INTO dtn_cur; IF DTN%NOTFOUND THEN /** start --added for cha 2011-3172 6/14/2011 **/ OPEN UNA(:NEW.LAYOUT_NO, :NEW.ACCOUNT_NO); FETCH UNA INTO una_cur; --------------------------------- -- CAPTURE UNPROCESSED ACCOUNT -- --------------------------------- IF UNA%NOTFOUND THEN INSERT INTO UNPROCESSED_ACCOUNTS (LAYOUT_NO , EMPL_NO , ACCOUNT_NO , LOG_DATE , COMPLETE_TODAY , NEW_ACCOUNT_NO , STATUS , CREATED_BY , MODIFIED_BY , CUT_NO , CREATE_DATE , MODIFIED_DATE ) VALUES (:NEW.LAYOUT_NO , NULL , :NEW.ACCOUNT_NO , NULL , NULL , NULL , :NEW.STATUS , :NEW.CREATE_BY , :NEW.CREATE_BY , :NEW.CUT_NO , :NEW.CREATE_DATE , :NEW.CREATE_DATE ); stmt_var := 'Insert Unprocessed Accounts'; SELECT EMAIL INTO V_CCI FROM C_LOV_CCI WHERE UPPER(NAME) = (SELECT UPPER(CCI) FROM CR_LAYOUT_TRACKING WHERE layout_no = :NEW.LAYOUT_NO); IF SQL%NOTFOUND THEN V_CCI := '[email protected]'; END IF; V_CCI := '[email protected]';--6/24 conn:= utl_smtp.open_connection( 'EXCHSMTP.coned.com'); utl_smtp.helo(conn, 'coned.com'); utl_smtp.mail(conn, '[email protected]' ); utl_smtp.rcpt(conn, '[email protected]' ); utl_smtp.rcpt(conn, V_CCI); mesg:= 'From: Cut Staging After Insert <[email protected]>' || crlf || 'Subject: Unprocessed Account (Testing)' || crlf || 'To: XYZ <[email protected]>' || crlf || 'Cc: ' || V_CCI || crlf ; mesg:= mesg || '' || crlf || 'Unprocessed account found: '||' Layout No: '|| :NEW.LAYOUT_NO || ' , Account No: '|| :NEW.ACCOUNT_NO ||' , Status: '|| :NEW.STATUS || ' , Created By: '|| :NEW.CREATE_BY ||' , Cut No.: '|| :NEW.CUT_NO || ' , Create Date: '|| :NEW.CREATE_DATE; utl_smtp.data( conn, mesg ); utl_smtp.quit( conn ); END IF; /** end --added for cha 2011-3172 6/14/2011 **/ INSERT INTO CR_FIELD_CUT_DETAIL (LAYOUT_NO , CUT_NO , SHALLOW_FACILITIES , CUT_LENGTH , CUT_WIDTH , CUT_DEPTH , BASE_DEPTH , BASE_MATERIAL , SURFACE_DEPTH , SURFACE_MATERIAL , LANE , START_POINT , LINEAR_START_CUT , LINEAR_CURB_CUT , SHAPE , PAVING_REQUIRED , OPENED_DATE , EXCAVATION_DATE , BACKFILL_DATE , BASE_DATE , TRENCHING_DATE , BASE_MAT_REPLACED , COMBINED_CUT , CASTING_DEDUCTION , ACCOUNT_NO , CREATE_DATE , CREATE_BY , NOTE , STATUS , REMARK , PERMIT_NO) VALUES (:NEW.LAYOUT_NO , :NEW.CUT_NO , :NEW.SHALLOW_FACILITIES , :NEW.CUT_LENGTH , :NEW.CUT_WIDTH , :NEW.CUT_DEPTH , :NEW.BASE_DEPTH , :NEW.BASE_MATERIAL , :NEW.SURFACE_DEPTH , :NEW.SURFACE_MATERIAL , :NEW.LANE , :NEW.START_POINT , :NEW.LINEAR_START_CUT , :NEW.LINEAR_CURB_CUT , :NEW.SHAPE , :NEW.PAVING_REQUIRED , TRUNC(:NEW.OPENED_DATE) , TRUNC(:NEW.EXCAVATION_DATE) , TRUNC(:NEW.BACKFILL_DATE) , TRUNC(:NEW.BASE_DATE) , TRUNC(:NEW.TRENCHING_DATE) , :NEW.BASE_MAT_REPLACED , :NEW.COMBINED_CUT , :NEW.CASTING_DEDUCTION , :NEW.ACCOUNT_NO , systime , :NEW.CREATE_BY , :NEW.NOTE , :NEW.STATUS , :NEW.REMARK , :NEW.PERMIT_NO); stmt_var := 'Insert Cut Detail'; END IF; /* Insert record from staging table to Cut Item Table */ INSERT INTO CR_FIELD_CUT_ITEM (LAYOUT_NO , CUT_NO , SEQ_NO , CODE , LENGTH , WIDTH , DEPTH , DATE_WORKED , CREATE_DATE , CREATE_BY , NOTE , STIP_FACTOR ) VALUES (:NEW.LAYOUT_NO , :NEW.CUT_NO , :NEW.SEQ_NO , :NEW.CODE , :NEW.LENGTH , :NEW.WIDTH , :NEW.DEPTH , TRUNC(:NEW.DATE_WORKED) , systime , :NEW.CREATE_BY , :NEW.NOTE , :NEW.STIP_FACTOR ); stmt_var := 'Insert Cut Items'; /* This inserts record from staging to history table. */ BEGIN INSERT INTO CR_FIELD_CUT_HISTORY (LAYOUT_NO , PERMIT_TYPE , PO_NUMBER , HOUSE_NUMBER , SAWCUT , PLATED , COUNTY , STATE , WEST_MAP_ID , OPENED_BY_CONTR , PROTECTED_ST , COMPASS_POINT , STREET_NAME , ARTERY_TYPE , LEFT_CROSS_STREET , RIGHT_CROSS_STREET , SPECIFIC_LOC , EMER_PERMIT_NO , EMER_ISSUE_DATE , SERVICE_TYPE , PARKING_RESTR , RESTORE_REQD , CUT_NO , SHALLOW_FACILITIES , CUT_LENGTH , CUT_WIDTH , CUT_DEPTH , BASE_DEPTH , BASE_MATERIAL , SURFACE_DEPTH , SURFACE_MATERIAL , LANE , START_POINT , LINEAR_START_CUT , LINEAR_CURB_CUT , SHAPE , PAVING_REQUIRED , OPENED_DATE , EXCAVATION_DATE , BACKFILL_DATE , BASE_DATE , TRENCHING_DATE , BASE_MAT_REPLACED , COMBINED_CUT , CASTING_DEDUCTION , ACCOUNT_NO , SEQ_NO , CODE , LENGTH , WIDTH , DEPTH , DATE_WORKED , CREATE_DATE , CREATE_BY , NOTE , STATUS , PERMIT_NO , STIP_FACTOR ) VALUES (:NEW.LAYOUT_NO , :NEW.PERMIT_TYPE , :NEW.PO_NUMBER , :NEW.HOUSE_NUMBER , :NEW.SAWCUT , :NEW.PLATED , :NEW.COUNTY , :NEW.STATE , :NEW.WEST_MAP_ID , lot_cur.contractor_name , -- Get it from LOT Change Track 2010-4071 :NEW.PROTECTED_ST , :NEW.COMPASS_POINT , :NEW.STREET_NAME , :NEW.ARTERY_TYPE , :NEW.LEFT_CROSS_STREET , :NEW.RIGHT_CROSS_STREET , :NEW.SPECIFIC_LOC , :NEW.EMER_PERMIT_NO , TRUNC(:NEW.EMER_ISSUE_DATE) , :NEW.SERVICE_TYPE , :NEW.PARKING_RESTR , :NEW.RESTORE_REQD , :NEW.CUT_NO , :NEW.SHALLOW_FACILITIES , :NEW.CUT_LENGTH , :NEW.CUT_WIDTH , :NEW.CUT_DEPTH , :NEW.BASE_DEPTH , :NEW.BASE_MATERIAL , :NEW.SURFACE_DEPTH , :NEW.SURFACE_MATERIAL , :NEW.LANE , :NEW.START_POINT , :NEW.LINEAR_START_CUT , :NEW.LINEAR_CURB_CUT , :NEW.SHAPE , :NEW.PAVING_REQUIRED , TRUNC(:NEW.OPENED_DATE) , TRUNC(:NEW.EXCAVATION_DATE) , TRUNC(:NEW.BACKFILL_DATE) , TRUNC(:NEW.BASE_DATE) , TRUNC(:NEW.TRENCHING_DATE) , :NEW.BASE_MAT_REPLACED , :NEW.COMBINED_CUT , :NEW.CASTING_DEDUCTION , :NEW.ACCOUNT_NO , :NEW.SEQ_NO , :NEW.CODE , :NEW.LENGTH , :NEW.WIDTH , :NEW.DEPTH , TRUNC(:NEW.DATE_WORKED) , systime , :NEW.CREATE_BY , 'PROCESSED '||TO_CHAR(systime , 'MM/DD/YYYY HH:MI:SS'), :NEW.STATUS , :NEW.PERMIT_NO , :NEW.STIP_FACTOR ); stmt_var := 'Insert Cut History'; EXCEPTION WHEN DUP_VAL_ON_INDEX THEN NULL; END; /* This will insert/update the records in CR_FIELD_LAYOUT_STATUS */ OPEN STAT(:NEW.LAYOUT_NO); FETCH STAT INTO STAT_CUR; IF stat_cur.cdate IS NULL THEN /* Offset system date inserted by 1 second (SYSDATE+.00001) to prevent PK_LOT_STAT constraint from firing when the cuts are entered simultaneously with logs. */ INSERT INTO CR_FIELD_LAYOUT_STATUS (LAYOUT_NO, STATUS, CREATE_BY, CREATE_DATE, NOTE) VALUES (:NEW.LAYOUT_NO, 'AWAITING_COMPLETION', :NEW.CREATE_BY, SYSDATE+.00001, 'Cut Inserted by Field Personnel '|| to_char(SYSDATE+.00001,'MM/DD/YYYY HH:MI:SS AM')); stmt_var := 'Insert Layout Status'; ELSE UPDATE CR_FIELD_LAYOUT_STATUS SET CREATE_DATE = SYSDATE , NOTE = 'Cuts Updated: '|| to_char(SYSDATE+.00001,'MM/DD/YYYY HH:MI:SS AM') -- CT 2009-5511 09/10/09 Removed concatenation WHERE LAYOUT_NO = :NEW.LAYOUT_NO AND STATUS = 'AWAITING_COMPLETION' AND CREATE_DATE = stat_cur.cdate; stmt_var := 'Update Layout Status'; END IF; CLOSE CUT; CLOSE DET; CLOSE DTN; CLOSE ITM; CLOSE LOT; CLOSE STAT; CLOSE UNA;--added for cha 2011-3172 6/14/2011 /* When exceptions are raised, the users will be notified for the failure. */ EXCEPTION WHEN OTHERS THEN err_msg := SQLERRM; INSERT INTO CR_FIELD_ERROR VALUES(:NEW.LAYOUT_NO, ' Cut No.: '||:NEW.CUT_NO ||' Item No.: '||:NEW.SEQ_NO, SYSDATE, err_msg); /* conn:= utl_smtp.open_connection( 'EXCHSMTP.coned.com'); utl_smtp.helo(conn, 'coned.com'); utl_smtp.mail(conn, '[email protected]' ); utl_smtp.rcpt(conn, '[email protected]' ); utl_smtp.rcpt(conn, cc_recipient); mesg:= 'From: Cut Staging After Insert <[email protected]>' || crlf || 'Subject: CR_FIELD_CUT_AFTER_INSERT Trigger Failed (Testing)' || crlf || 'To: Harsha <[email protected]>' || crlf || 'Cc: ' || cc_recipient || crlf ; mesg:= mesg || '' || crlf || msg_body || ' Layout No.: '|| :NEW.LAYOUT_NO || ' Cut No.: ' || :NEW.CUT_NO || ' Item No.: ' || :NEW.SEQ_NO || ' **ErrorMessage** '||err_msg||' Error found after this statement: '||stmt_var; utl_smtp.data( conn, mesg ); utl_smtp.quit( conn );*/ --6/24 conn:= utl_smtp.open_connection( 'EXCHSMTP.coned.com'); utl_smtp.helo(conn, 'coned.com'); utl_smtp.mail(conn, '[email protected]' ); utl_smtp.rcpt(conn, '[email protected]' ); utl_smtp.rcpt(conn, cc_recipient); mesg:= 'From: Cut Staging After Insert <[email protected]>' || crlf || 'Subject: CR_FIELD_CUT_AFTER_INSERT Trigger Failed (Testing)' || crlf || 'To: XYZ <[email protected]>' || crlf || 'Cc: ' || cc_recipient || crlf ; mesg:= mesg || '' || crlf || msg_body || ' Layout No.: '|| :NEW.LAYOUT_NO || ' Cut No.: ' || :NEW.CUT_NO || ' Item No.: ' || :NEW.SEQ_NO || ' **ErrorMessage** '||err_msg||' Error found after this statement: '||stmt_var; utl_smtp.data( conn, mesg ); utl_smtp.quit( conn ); END;
It's just a guess,
what you the sliders are open regardless of any condition, for example;
OPEN CUT(:NEW.LAYOUT_NO); OPEN DET(:NEW.LAYOUT_NO); OPEN ITM(:NEW.LAYOUT_NO); OPEN LOT(:NEW.LAYOUT_NO); OPEN DTN(:NEW.LAYOUT_NO, :NEW.CUT_NO, :NEW.NOTE);
UNA is however open after a condition;
IF DTN%NOTFOUND THEN /** start --added for cha 2011-3172 6/14/2011 **/ OPEN UNA(:NEW.LAYOUT_NO, :NEW.ACCOUNT_NO);
All in sliders however closed without worrying, that is, they are all suppose to be open;
CLOSE CUT; CLOSE DET; CLOSE DTN; CLOSE ITM; CLOSE LOT; CLOSE STAT; CLOSE UNA;
So I think you close the wen of cursors UNA this is indeed not to open.
So, pass the "NARROW UNA"; line of code before the END IF; on line 278, since that's when it will definitely be open. -
Hello
I get an error ora-01722 "invalid number" during execution of this query,
replacement tank (3) in the source and dest tables = _nodeINSERT INTO STG_ALTERNATE_NODE SELECT SN.STG_NODE_INST_ID, AN.ADABAS_ISN, AN.DPS_MU_SEQ, AN.ALTERNATE_NODE FROM M07_ALTERNATE_NODE AN,STG_NODE_INST SN WHERE AN.ADABAS_ISN=SN.ADABAS_ISN;
bad order, must be:
INSERT INTO STG_ALTERNATE_NODE SELECT AN.ADABAS_ISN, AN.DPS_MU_SEQ, AN.ALTERNATE_NODE, SN.STG_NODE_INST_ID FROM M07_ALTERNATE_NODE AN,STG_NODE_INST SN WHERE AN.ADABAS_ISN=SN.ADABAS_ISN;
-
I'm trying to RE install PSElements 11 on a computer where it WAS last week but has had a hard disk crash. The message is wrong and the serial number is correct. URGENT because I'm on the apple store, trying to get help from apple people and they don't want install me a new version of Yosemite by making computer more slow...
Error "serial number is not valid for this product". Creative Suite
http://helpx.Adobe.com/Creative-Suite/KB/error-serial-number-valid-product.html
-
Serial number not valid?
I was finally able to download items with a link provided by a member of the team of Chat on my MacBook Air. I got to the part where I put my serial number. I did this with one that was sent by Adobe. And when I put in it says 'this serial number is not valid for Photoshop Elements'. How do make sense
That's the problem. A windows serial number does not work on Mac. I don't know your account shows that you bought a Windows product. You will need to contact Adobe directly and request an exchange of platform.
-
Hello
We get an error when you try to apply revenues, ORA-00904: "ON_ACCT_PO_NUM": invalid identifier. Found some Metalink:
Find and apply functionality Arxrwmai filled with ORA-00904: error "ON_ACCT_PO_NUM" [388202.1 ID]
ARXRWMAI: ORA-00904: "On_acct_po_num": invalid identifier, applying the reception [564612.1 ID]
ARP_PROCESS_APPLICATION is not valid - PLS-00302: component 'ON_ACCT_CUST_ID' must be declared [577194.1 ID]
Basically all suggest that the columns (IE ON_ACCT_PO_NUM) are missing in AR_RECEIVABLE_APPLICATIONS. Check these tables and columns are actually there, however, I ran SQL > @$AR_TOP/patch/115/sql/arvrrapp.sql (the version is 115.26.15104.3). And re-tested, always a problem. Audit to verify what patches have been applied recently that could cause this.
RDBMS: 11.2.0.1.0
Oracle Applications: 11.5.10.2
Thank you
-SteveHi steve;
Check use select * ad_bugs and check patch that applied using the applied date column
* PS: patch 5359197 is exist on your server that is mentioned on the research and apply feature Arxrwmai ends with ORA-00904: error "ON_ACCT_PO_NUM" [388202.1 ID] *.
Respect of
HELIOS -
CS5 serial number not valid?
Hello
I change my computer to a Windows 10. Installed PS CS5, use my SN since my last purchase but say PS is not valid! My PS version on my old computer is disabled.
I don't know why my SN is not recognized. I bought PS CS5 directly from Adobe. It was an upgrade to CS3, which was an upgrade from CS2... I also tried old SN, but without result.
No idea how to solve this problem?
Thank you
Hi again,
Please visit this link - upgrade to Photoshop CS5 from CS3/CS2/6.0
~ Rohit
-
DECODE does not work in the WHERE clause when subquery returns more than one line
Hi gurus,
I want to write a query against the table CCENTERS (Script given below) and wait for the following result:
1. in the transition from a value of 0 for the ID, it returns all the rows in the table.
2. in the passage of one value other than 0, it returns the row corresponding to the given value and all its records of the child.
CCENTER has parent-child relationship in the column ID and the BASE. I use a query with the DECODE function. but the function in the WHERE clause is not capable of managing the subquery with multiple lines of DECODE.
*************************************************
VARIABLE ParaCCenter NUMBER
BEGIN
: paraccenter: = 0;
END;
/
CREATE TABLE ccenters
(id NUMBER,
name VARCHAR2 (20).
number base);
INSERT INTO ccenters VALUES(1,'NUST',null);
INSERT INTO ccenters VALUES(2,'SEECS',1);
INSERT INTO ccenters VALUES(3,'NBS',1);
commit;
SELECT * from ccenters
WHERE id IN DECODE(:ParaCCenter, 0, id,)
(SELECT id FROM ccenters
START WITH basic =: ParaCCenter
ID of CONNECTION BY PRIOR = base
UNION
SELECT: ParaCCenter OF double
)
)
/
BEGIN
: paraCCenter: = 1;
END;
/
SELECT * from ccenters
WHERE id IN DECODE(:ParaCCenter, 0, id,)
(SELECT id FROM ccenters
START WITH basic =: ParaCCenter
ID of CONNECTION BY PRIOR = base
UNION
SELECT: ParaCCenter double))
/
The result is
(SELECT id FROM ccenters
*
ERROR at line 3:
ORA-01427: einreihig subquery returns multiple rows
How this query can be rewritten for the given feature. Any response will be appreciated.
Thank youTry something like this:
SELECT * FROM ccenters WHERE :ParaCCenter = 0 OR id in (SELECT id FROM ccenters START WITH base=:ParaCCenter CONNECT BY PRIOR id = base UNION SELECT :ParaCCenter FROM dual )
-
Setting of outsourcing work is not for a SQL Where clause
Im trying to outsource the WHERE SQL clause of a snapshot data (connecting to Siebel DB) and specify where clause in the run profile that does not work.
Snapshot of research: Select the name of siebel.s_org_ext
Parameter of outsourcing: where_clause_sql
Run the content of the profile:
phase. Phase1.snapshot.clt.where_clause_sql = name = "ABC0009".
#phase. Phase1.snapshot.clt.snapshot_sql = select name from siebel.s_org_ext where name = 'ABC0009 '.
The above parameter retrieves all the records in the table. Below the profile execution retrieves just this record that seems to work fine.
Run the content of the profile:
phase. Phase1.snapshot.clt.snapshot_sql = select name from siebel.s_org_ext where name = 'ABC0009 '.
I want to outsource only where clause as there are many SQL and they are huge to maintain in the run profile.
I have attached a doco with screenshots that will help to understand more.
Hello
You must BE
-Choose "Select table or view" in the table of the snapshot Wizard selection page
&
-Use outsourced where clause
OR
-Choose "SQL" in the snapshot table selection wizard page.
&
-Outsourced use SQL snapshot
You can't mix and match options.
Kind regards
Nick
-
NVL selection list does not not on the place where clause in query
Ok. APEX 4.2...
Im having problems with my selection lists and NULL values... I see that it has come time and time again...
I have a tabular presentation, with a query based on a selection list. The selection list has the ability to '- Show All -'... The value of the selection list is a number, and the display is words... (for reference the LOV query is: select status, batch from pmt_stat_lookup by 1)
Initially I had problems with null and invalid numbers like ' display Null = 'Yes' and the problem of null % ', so have used the code in this blog to remove the NULL values... Display Null = & amp; #34; Yes & amp; #34; and the problem of null % | Inside Oracle APEX by Patrick Wolf
Then in the application of my report, I have a where clause clause that checks the value of the selection list... WHERE batch = nvl(:P11_STATUS_SELECT,STATUS_ID)
everything works almost fine, and I can choose a status, or I choose - see the All-, but the query will not include the lines where the State is null.
(I also see that maybe I should be, use the case statement instead of the NVL on where clause, but not sure of the syntax. In addition, NVL was used somewhat in the different reports in the application...)
For reference, the code of the old blog that I as a process page is:
BEGIN
FOR rItem IN
(SELECT NOM_ELEMENT
OF APEX_APPLICATION_PAGE_ITEMS
WHERE APPLICATION_ID = TO_NUMBER(:APP_ID)
AND PAGE_ID IN (TO_NUMBER(:APP_PAGE_ID), 0)
AND LOV_DISPLAY_NULL = 'Yes'
AND LOV_DEFINITION IS NOT NULL
-change here
AND LOV_NULL_VALUE = '% null | '%'
)
LOOP
IF V (rItem.ITEM_NAME) = "% null | '%'
THEN
Apex_Util.set_session_state (rItem.ITEM_NAME, NULL);
END IF;
END LOOP;
END;
Thank you very much
Richard
Richard,
Perhaps this example can help you solve your problem.
https://Apex.Oracle.com/pls/Apex/f?p=63838:2
Jeff
-
Not able to add Where clause I last query
Dear Metallica
I created the report and last, I added where clause to find record use Serach point in the area of research, but it does not work
My Code
Below where conditon does notSELECT apex_item.checkbox (1, timesheet_id, 'UNCHECKED') tick, timesheet_id, pm.description project_description, pm.project_id, pm.NAME, tam.task_name, xxpria_vendor_name (resource_name) resource_name, submission_date "Timesheet Date", quantity hours, (planed_hour - tm.quantity) balance, tm.attribute2 remarks FROM timesheet_master tm, pa_task_mas tam, pa_projects_all pm WHERE tam.task_id = tm.task_number and pm.project_id=tm.PROJECT_NUMBER AND tm.submitted_flag = 'Y' AND xx_resource_id (resource_name) = (SELECT DISTINCT person_id FROM pa_project_players WHERE project_role_type LIKE 'TEAM MEMBER' AND person_id = xx_resource_id (tm.resource_name) AND project_id = pm.project_id AND tm.submission_date BETWEEN start_date_active AND NVL (end_date_active, '01-APR-2040' )) AND tm.approved_flag = 'N' AND status = 'INPROCESS' AND pm.project_id IN ( SELECT project_id FROM pa_project_players WHERE project_role_type = 'PROJECT LEADER' AND person_id = xx_resource_id (:app_user) AND tm.submission_date BETWEEN start_date_active AND NVL (end_date_active, '01-APR-2040' )) UNION SELECT apex_item.checkbox (1, timesheet_id, 'UNCHECKED') tick, timesheet_id, pm.description project_description, pm.project_id, pm.NAME, tam.task_name, xxpria_vendor_name (resource_name) resource_name, submission_date "Timesheet Date", quantity hours, (planed_hour - tm.quantity) balance, tm.attribute2 remarks FROM timesheet_master tm, pa_task_mas tam, pa_projects_all pm WHERE tam.task_id = tm.task_number and pm.project_id=tm.PROJECT_NUMBER AND tm.submitted_flag = 'Y' AND xx_resource_id (resource_name) = (SELECT DISTINCT person_id FROM pa_project_players WHERE project_role_type LIKE 'PROJECT LEADER' AND person_id = xx_resource_id (tm.resource_name) AND project_id = pm.project_id AND tm.submission_date BETWEEN start_date_active AND NVL (end_date_active, '01-APR-2040' )) AND tm.approved_flag = 'N' AND status = 'INPROCESS' AND pm.project_id IN ( SELECT project_id FROM pa_project_players WHERE project_role_type = 'PROJECT MANAGER' AND person_id = xx_resource_id (:app_user) AND tm.submission_date BETWEEN start_date_active AND NVL (end_date_active, '01-APR-2040' )) UNION SELECT apex_item.checkbox (1, timesheet_id, 'UNCHECKED') tick, timesheet_id, pm.description project_description, pm.project_id, pm.NAME, tam.task_name, xxpria_vendor_name (resource_name) resource_name, submission_date "Timesheet Date", quantity hours, (planed_hour - tm.quantity) balance, tm.attribute2 remarks FROM timesheet_master tm, pa_task_mas tam, pa_projects_all pm WHERE tam.task_id = tm.task_number and pm.project_id=tm.PROJECT_NUMBER AND tm.submitted_flag = 'Y' AND xx_resource_id (resource_name) = (SELECT DISTINCT person_id FROM pa_project_players WHERE project_role_type LIKE 'PROJECT MANAGER' AND person_id = xx_resource_id (tm.resource_name) AND project_id = pm.project_id AND tm.submission_date BETWEEN start_date_active AND NVL (end_date_active, '01-APR-2040' )) AND tm.approved_flag = 'N' AND status = 'INPROCESS' AND pm.project_id IN ( SELECT project_id FROM pa_project_players WHERE project_role_type = 'PRACTICE HEAD' AND person_id = xx_resource_id (:app_user) AND tm.submission_date BETWEEN start_date_active AND NVL (end_date_active, '01-APR-2040' )) where (nvl(:P75_RESOURCE_NAME,'0') = '0' or tm.resource_name=:P75_RESOURCE_NAME)
How to solve it.where (nvl(:P75_RESOURCE_NAME,'0') = '0' or tm.resource_name=:P75_RESOURCE_NAME)
Thank youTry:
select * from ( <
> ) where nvl(:P75_RESOURCE_NAME,'0') = '0' or resource_name=:P75_RESOURCE_NAME -
Expand the view read-only object where Clause
Hello
Is there a way I can add another where, condition of the clause to a viewobject unalterable in my bean limit support more query? The view object has a where clause itself clause which I want to thank. However, it is not editable or based on an entity object.Hello
You can use ViewCriteriaRow to add where clause dynamically.
http://download.Oracle.com/docs/CD/E15051_01/apirefs.1111/e10653/Oracle/JBO/ViewCriteriaRow.html
In addition, you can also use a variable binding in the where clause and use setWhereClauseParams method before calling executeQuery.
http://download.Oracle.com/docs/CD/E15051_01/apirefs.1111/e10653/Oracle/JBO/ViewObject.html#setWhereClause (java.lang.String)
HTH.
Arun-
-
To_Number fails because the number not valid
I have a value which is unfortunately in a field of varchar (50) free form text and I'm updating a table which is a numeric field. The data could be anything. From my research, it sounds like its values as 18000, or $20,000, $23 000,00, $28 000,00 or or $35,000.0000.
I tried the command To_Number and it failed.
I made a function replace and stripped dollar signs and commas and the still empty spaces and as a last resort even stripped periods just to try to put incorrect data, perhaps thinking that the free text field has had two periods in it.
I have an IS_NUMBER function and when I run the field through here, he said they are all numbers, but when I update it does not say that it is an invalid number.
I have a long msft sql dba, but Oracle is all new to me.
BEGIN
merge into wh_cust_act_brand t
a_l'_aide_de)
Select cust_no, activ_no, ss. SETTING_VALUE
OF GMSTG. STG_service_settings ss
WHERE ss.setting_id = 'lifeline_qualifying_income. '
and ss.setting_value is not null
and not exists (select 1
of wh_cust_act_brand c
where c.cust_no = ss.cust_no
and c.activ_no = ss.activ_no
and c.lifeline_qualifying_income = ss.setting_value
(q))
WE (t.cust_no = q.cust_no and t.activ_no = q.activ_no)
When matched then
game update
t.update_date = sysdate,
I tried these:
-t.lifeline_qualifying_income = q.setting_value
-t.lifeline_qualifying_income = replace (replace (replace (replace (q.setting_value, ' $', "),",","), '-', "), ' ',");
-t.lifeline_qualifying_income = TO_NUMBER (replace (replace (replace (replace (q.setting_value, ' $', "),",","), '-', "), ' ',"), ' $9,999,999.99999999 ' ");
-t.lifeline_qualifying_income = cast (regexp_replace (q.setting_value, "[^ 0-9.]")) +', ") under the number);
-t.lifeline_qualifying_income = regexp_replace (q.setting_value, "[^ 0-9] +'," ");
t.lifeline_qualifying_income =
(CASE
WHEN substr (q.setting_value, 1, 1) = "$" then to_number (substr (replace (q.setting_value, ',', "), length (q.setting_value)-1, 2)," 9999999.99999999' ")
WHEN substr (q.setting_value, 1, 1) <>' $' then to_number (replace (q.setting_value, ',' ")," 999999.9999' ")
-ANOTHER '0'
(END);
EXCEPTION
WHILE OTHERS THEN
raise_application_error (-20001,' an error has occurred - ' |) SQLCODE |' - ERROR - ' | SQLERRM);
END;
OK, I finally got to work:
I think that the problem was way up above in code at line 3 and 11, I compared a number in a field of type varchar field, once I fixed that Oracle was much happier.
merge into wh_cust_act_brand t
a_l'_aide_de)
Select cust_no, activ_no, to_number (replace (replace (trim (setting_value), ' $', "),",",")) setting_value
OF GMSTG. STG_service_settings ss
WHERE ss.setting_id = 'lifeline_qualifying_income. '
and ss.setting_value is not null
and not exists (select 1
of wh_cust_act_brand c
where c.cust_no = ss.cust_no
and c.activ_no = ss.activ_no
and c.lifeline_qualifying_income = to_number (replace (replace (trim (setting_value), ' $', "),",","))
(q))
WE (t.cust_no = q.cust_no and t.activ_no = q.activ_no)
When matched then
game update
t.update_date = sysdate,
t.lifeline_qualifying_income = to_number (replace (replace (trim (setting_value), ' $', "),",","));
-
install acrobat 9.0 serial number not valid?
I upgraded my PC and want to spend my Acrobat 9.0 standard my old PC. I downloaded the installer for 9.0 std from the Web site and ran it. He asked my serial number. I enter my serial number shown on my account for my registered software, but it tells me it is invalid and will not let me install. I chatted with support and they have validated that my serial number is for 9.0 std. Why it will appear as invalid when I try to install it on my new PC?
Hi andym,.
Have you installed Acrobat 9 as part of the Creative Suite 4? If so, please see error "incorrect serial number | Acrobat 9 | CS4.
Please let us know if this document hits the mark.
Best,
Sara
-
ORA-900 sql not valid reporting error while calling the optimize_index pl/sql procedure
Hi Experts,I'm on Oracle 11.2.0.3 on Linux and I have installed in my database Oracle text. I want to configure annex dbms_job to optimize my oracle text index. So first, I created a pl/sql procedure to optimize indexes. It gives me error ORA-900, but the sql even if I run in sqlplus works very well! Can you please help me the question is to find:
Here is the procedure:
(Either incidentally CTXAPP role has been granted in the schema where these Oracle text indexes are created and where the below procedure to optimize the index is running.)
CREATE OR REPLACE PROCEDURE optimize_ora_txt_indexes_debug IS CURSOR cur_context_indexes IS SELECT index_name FROM user_indexes WHERE index_type = 'DOMAIN' AND ROWNUM<2 ORDER BY INDEX_NAME; v_user VARCHAR2 (30); v_pod VARCHAR2 (30); v_start_time TIMESTAMP; v_end_time TIMESTAMP; v_elapsed VARCHAR2 (40); v_msg VARCHAR2 (1000); v_error_code NUMBER; v_error_msg VARCHAR2 (1000); v_sql VARCHAR2 (1000); BEGIN FOR c IN cur_context_indexes LOOP BEGIN v_sql:= 'ctx_ddl.optimize_index (idx_name =>'||chr(39)|| c.index_name||chr(39)||', optlevel => '||chr(39)||'FULL'||chr(39)||')'; dbms_output.put_line(v_sql); execute immediate v_sql; EXCEPTION WHEN OTHERS THEN v_error_code := SQLCODE; v_error_msg := SQLERRM; v_msg := 'Error while optimizing the index ' || c.index_name || ' ' || TO_CHAR (v_error_code) || ' ' || v_error_msg; DBMS_OUTPUT.put_line (v_msg); END; END LOOP; EXCEPTION WHEN OTHERS THEN v_error_code := SQLCODE; v_error_msg := SQLERRM; v_msg := 'Error while in the optimize index procedure' || ' ' || TO_CHAR (v_error_code) || ' ' || v_error_msg; DBMS_OUTPUT.put_line (v_msg); END optimize_ora_txt_indexes_debug; / --the procedure compiles successfully. Now when I run it , I get the error: SQL>exec optimize_ora_txt_indexes_debug; ctx_ddl.optimize_index (idx_name =>'ACCESS_CLNT_IDX04', optlevel => 'FULL') Error while optimizing the index ACCESS_CLNT_IDX04 -900 ORA-00900: invalid SQL statement --When I run the same command from sqlplus as execute statement , it works fine: SQL>exec ctx_ddl.optimize_index (idx_name =>'ACCESS_CLNT_IDX04', optlevel => 'FULL'); PL/SQL procedure successfully completed.
If everything runs from sqlplus, but fails in plsql... I'll be very grateful for pointers solve the problem.
Thanks,
OrauserN
Hello
It is a problem of pl/sql syntax. A call with EXEC is the same using BEGIN... Code of... END of block;
SO, you need to include a beginning and an end to your call:
v_sql:= 'BEGIN ctx_ddl.optimize_index (idx_name =>'||chr(39)|| c.index_name||chr(39)||', optlevel => '||chr(39)||'FULL'||chr(39)||'); END;';
That's all.
Herald tiomela
Maybe you are looking for
-
Wanted: The Message Preview pane
MS Outlook has a preview pane of a message allowing you to display the first line of a message in the Inbox without opening it. It does not appear that Thunderbird has it. Is there an add-on that adds this functionality?
-
I can't install hotkey software under Vista?
Hi, is it possible to install the software of toshiba Windows vista keyboard shortcut? I don't him have not found on the web. PS: Sorry for my English! I come from Germany...
-
Void VI does not update when printing
I try to print a report that I have created Sub vi in my main vi. I have several entries that are generated in the main vi I want to put in a custom report, then print. Currently, I have the report should be generated each time that I have pres the
-
I did not cause the errors on my windows live mail. Why n "windows t fix it.
I can t send or receive direct mail windows errors. Why don, t they correct their mistakes.
-
sleep disabled after update - place 11 pro 7130 A13
I installed the A13 bios and noticed that I lost my sleep option when the power off. He just disappeared in the menus and the power button that was previously mapped to sleep has no effect when you press. Run powercfg /a showed the culprit to be the