"ORA-12401: invalid label string: " error - oracle

I am trying to run a simple update statement in Oracle to modify an Integer field of a specific row.
UPDATE Mytable
SET field1 = 2
WHERE field2 = 11111;
But I receive this error
SQL Error: ORA-12401: invalid label string:
ORA-06512: at "LBACSYS.NUMERIC_LABEL_TO_CHAR", line 1
ORA-06512: at "LBACSYS.LBAC$BU0_92924", line 1
ORA-04088: error during execution of trigger 'LBACSYS.LBAC$BU0_92924'
12401. 00000 - "invalid label string: %s"
*Cause: The policy could not convert the label string to a valid
internal label.
*Action: Correct the syntax of the label string.
Google search did not bring much results. Do you have any idea about the solution of this error?

Related

Oracle Text truncate words to 64 CHARS but token limit is 64 BYTES

I'm using Oracle 19c.
I have a table with a VARCHAR2(4000) column for which I'm creating a full-text index using Oracle Text.
The SQL creating the index is as follow:
begin
ctx_ddl.create_index_set('ix_iset');
ctx_ddl.create_preference('ix_pref', 'BASIC_LEXER');
ctx_ddl.set_attribute('ix_pref', 'skipjoins', '-');
ctx_ddl.set_attribute ( 'ix_pref', 'index_stems', 'portuguese');
ctx_ddl.set_attribute ( 'ix_pref', 'index_text', 'YES');
ctx_ddl.set_attribute ( 'ix_pref', 'base_letter', 'YES');
end;
CREATE INDEX ix_tx_column ON MYTABLE(tx_column)
INDEXTYPE IS CTXSYS.CTXCAT
PARAMETERS ('index set ix_iset lexer ix_pref');
Everything works very well, but when there is a word with more than 64 chars, an error is raised:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text Error:
DRG-50857: oracle error in dreii1fsh
ORA-12899: value too large for column "CAD"."DR$IX_TX_COLUMN$I"."DR$TOKEN" (actual: 65, maximum: 64)
ORA-06512: em "CTXSYS.DRUE", line 186
ORA-06512: em "CTXSYS.CATINDEXMETHODS", line 102
29855. 00000 - "error occurred in the execution of ODCIINDEXCREATE routine"
*Cause: Failed to successfully execute the ODCIIndexCreate routine.
*Action: Check to see if the routine has been coded correctly.
I've looked into the documentation and the only reference to this limitation is this item:
2.14 Token Limitations for Oracle Text Indexes
After some research I realized that probably the Oracle-Text internal functions are truncating the words to 64 CHARS, but the token limit is 64 BYTES.
The text word causing this error have Diacritical Characters within its first 64 chars like ç ã õ é and so on... Each char are 2 bytes in size.
I tried to set NLS_LENGTH_SEMANTICS=BYTE with no success.
As long as I researched, there is no way how to change the size of the index token.
Edit:
The result of SELECT * FROM v$nls_parameters is:

Why does my SQL code tell me that paddling is not a good identifier?

I AM ON CLOUD VERSION OF ORACLE
so what I need to do is insert data from an already established table into a new table. I am a student and I pretty much copied what they told me to do, just changing the table and what i need to grab
here is my code:
INSERT INTO PADDLING
SELECT TRIP_ID, TRIP_NAME, STATE, DISTANCE,
MAX_GRP_SIZE,
SEASON
FROM TRIP
WHERE TYPE = Paddling;
and here is the error
ORA-00904: "PADDLING": invalid identifier
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_200200",
line 670
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1658
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_200200",
line 656
ORA-06512: at
"APEX_200200.WWV_FLOW_DYNAMIC_EXEC", line 1768
4. WHERE TYPE = Paddling;
I tried PADDLING in all uppercase, however it is lowercase in the table i am grabbing from.
You want to quote the string literal :
INSERT INTO PADDLING
SELECT TRIP_ID, TRIP_NAME, STATE, DISTANCE,
MAX_GRP_SIZE,
SEASON
FROM TRIP
WHERE TYPE = 'Paddling';
If you do not have the quotes then Oracle assumes it is an identifier, typically for a column name. To show that it is a string literal and not an identifier you need to use single quotation marks.

Cannot convert String to date in Oracle 11g

I'm trying to insert Date into table from user input but something doesn't work.
I have the following Query :
INSERT INTO DOCTORS.TREATMENTS
(START_OF_TREATMENT, END_OF_TREATMENT, DOCTORS_ID,PACIENTS_ID, DIAGNOSIS_ID)
VALUES (TO_DATE(&startdate, 'yyyy/mm/dd'), TO_DATE(&enddate, 'yyyy/mm/dd'), 3, 1, 1);
For start date I set :
2000/10/01
And for end date I set :
2000/11/01
It seem ok for me but I've got the following error :
Error report -
ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at "SYS.STANDARD", line 167
ORA-06512: at line 2
01858. 00000 - "a non-numeric character was found where a numeric was expected"
*Cause: The input data to be converted using a date format model was
incorrect. The input data did not contain a number where a number was
required by the format model.
*Action: Fix the input data or the date format model to make sure the
elements match in number and type. Then retry the operation.
Any one can explain to me why this error occurred.
Best regards,
Petar.
The value of the first parameter passed to TO_DATE must be a string. After substitution with the value you've given your code will look like
TO_DATE(2000/10/01, 'yyyy/mm/dd')
which fails as shown.
The solution is to put the parameter usage in single-quotes to make the substituted value a string, as in
TO_DATE('&startdate', 'yyyy/mm/dd')
This way, when &startdate is substituted you'll get
TO_DATE('2000/10/01', 'yyyy/mm/dd')
which will work as expected.
Do the same for &enddate.
Best of luck.

Inserting date text into table returns `not a valid month`

My NLS_DATE_FORMAT is DD/MM/YY
When I enter values like these
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,FACNO,CUSTNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E100',to_date('25/10/13'),to_date('06/06/13'),'F100','C100',to_date('08/06/13'),'Approved',5000,80000,'B1000');
The row is inserted but when I use the following Format this error message appears.
Error starting at line 2 in command:
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,FACNO,CUSTNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO)
values ('E101',to_date('26-OCT-13','DD-MON-RR'),to_date('28-JUL-13','DD-MON-RR'),'F100','C100',null,'Pending',5000,80000,'B1000')
Error report:
SQL Error: ORA-01843:not a valid month
01843. 00000 - "not a valid month"
*Cause:
*Action:
Can anybody help?
Exists somewhere else: Oracle insert failure : not a valid month
Maybe if you specify NLS_DATE_LANGUAGE?
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,FACNO,CUSTNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO)
values ('E101',to_date('26-OCT-13','DD-MON-RR', 'NLS_DATE_LANGUAGE = AMERICAN'),to_date('28-JUL-13','DD-MON-RR', 'NLS_DATE_LANGUAGE = AMERICAN'),'F100','C100',null,'Pending',5000,80000,'B1000')

store value of column into variable

I want to get a value of column, and put it into variable of the same type of that column, as the following :
select FRI_SEC_TEMP into friday_seconds
from TEMPTABLE
where rownum<2;
DBMS_OUTPUT.PUT_LINE(friday_seconds);
but when I run the script, it give me the following error:
Query Run In:Query Result 6
Error starting at line : 61 in command -
DBMS_OUTPUT.PUT_LINE(friday_seconds)
Error report -
Unknown Command
and when I run just the select statement I get the following error:
ORA-00905: missing keyword
00905. 00000 - "missing keyword"
*Cause:
*Action:
Just execute the script as a PL SQL block by surrounding it with begin - end
begin
select FRI_SEC_TEMP into friday_seconds
from TEMPTABLE
where rownum<2;
DBMS_OUTPUT.PUT_LINE(friday_seconds);
end;

Resources