log in - help sql: error ORA-01489: string concatena result

Here's a sql query and I am cooking a decoding, but since there are several columns invloved when I try to run it I get the following error:
ORA-01489: result of concatenating string is too long

Any kind of help is appreciated, I need to get it going or I'm dead :(

Concerning
Rahul



SQL:
Select sys_connect_by_path(c.decode_prep,'-') decode_prep
from (select "DECODE (BIAPPS_11.'|)") substr (b.all_cols, InStr(b.all_cols,',',1,a.RN) + 1, InStr(b.all_cols,',',1,a.RN+1)-InStr(b.all_cols,',',1,a.RN)-1). «, » ||' RAHULKALRA.' | substr (b.all_cols, InStr(b.all_cols,',',1,a.RN) + 1, InStr(b.all_cols,',',1,a.RN+1)-InStr(b.all_cols,',',1,a.RN)-1) |', "1", "0")' decode_prep, rownum curr, prev rownum-1
from (select rownum rn
Double connect rownum < =.
(select (length('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM ,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT ,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM')
- length(replace('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM ,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT ,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM',',')))+1 total_cols
the double)), (select ',' |') ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE ,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT SRC_EFF_FROM_DT , SRC_EFF_TO_DT, EFFECTIVE_FROM_DT, EFFECTIVE_TO_DT, DELETE_FLG, CURRENT_FLG, W_INSERT_DT, W_UPDATE_DT, DATASOURCE_NUM_ID, ETL_PROC_WID, INTEGRATION_ID, SET_ID, TENANT_ID, X_CUSTOM' | (',' double all_cols) b) c
Start by curr = 1
Connect prior curr = prev
length (sys_connect_by_path(c.decode_prep,'-')) desc order

---------------------------------------------------------------------------------------------

same as above sql only the difference is here I'm pulling the first record in the result set that top query returns:

Select ltrim (replace(decode_prep,'-','||'),'| ') decode_prep
of (sys_connect_by_path(c.decode_prep,'-') select decode_prep)
from (select "DECODE (BIAPPS_11.'|)") substr (b.all_cols, InStr(b.all_cols,',',1,a.RN) + 1, InStr(b.all_cols,',',1,a.RN+1)-InStr(b.all_cols,',',1,a.RN)-1). «, » ||' RAHULKALRA.' | substr (b.all_cols, InStr(b.all_cols,',',1,a.RN) + 1, InStr(b.all_cols,',',1,a.RN+1)-InStr(b.all_cols,',',1,a.RN)-1) |', "1", "0")' decode_prep, rownum curr, prev rownum-1
from (select rownum rn
Double connect rownum < =.
(select (length('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM ,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT ,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM')
- length(replace('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM ,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT ,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM',',')))+1 total_cols
the double)), (select ',' |') ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE ,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT SRC_EFF_FROM_DT , SRC_EFF_TO_DT, EFFECTIVE_FROM_DT, EFFECTIVE_TO_DT, DELETE_FLG, CURRENT_FLG, W_INSERT_DT, W_UPDATE_DT, DATASOURCE_NUM_ID, ETL_PROC_WID, INTEGRATION_ID, SET_ID, TENANT_ID, X_CUSTOM' | (',' double all_cols) b) c
Start by curr = 1
Connect prior curr = prev
length (sys_connect_by_path(c.decode_prep,'-')) desc order)
where rownum = 1

Published by: Mac_Freak_Rahul on November 28, 2012 01:31: in the first sql ')'
removed after desc in the last line so now this query begin and will throw an error.

Mac_Freak_Rahul wrote:
@Blushadow:

(1) first of all, I'm sorry for not posting my question according to the rules of the forum, next time I'll take care of that.
(2) Secondly, thanks for the solution, I have no exp with clob, but I can take a deeper look later.
(3) I just want to know if there are any other wayout, you mean the second concatenation of 4000 bytes sys_connect_by_path exhausts it might return this error?

SYS_CONNECT_BY_PATH returns a VARCHAR2 data type. In SQL VARCHAR2 data type is limited to 4000 bytes, then Yes, you will get an error if the data that you generate is greater than 4000 bytes (and I say bytes rather than characters, because if your database uses a multibyte multi character set could be as little as 1000 characters)

I'm right now stable for a table who got 62 columns... I have tables that have 200 close passes: (, great, if you can throw some light on this, if your the best way and the only one to achieve?)

If you really need to concatenate strings together which exceeds 4000 bytes, then Yes you must use CLOB to store data. Oracle does not provide a native way to aggregate together in a CLOB datatype string, so why you need to write your own function.

PS: just a quick overview of my value, it will be by comparing schema1.table (s) with shema2.table (s) where table_name must be the same...

So why are you information concatenation together to achieve this goal?

Tags: Database

Similar Questions

  • HELP to ' SQL error: ORA-00937: not a function of simple-group.

    < p >
    Hello world:

    I have a forum based on oracle 11g database. There two tables: article of thread and the relationship between the two is "one-to-many.

    I want to list the total number of seen of all the discussions in each section, and I write the sql code:

    Select s.secname, sum (sum1) of join of s section

    (select secid, sum1 sum (thrviewednum) of the Group of threads by secid) tt WE s.secid = tt.secid;



    The 'secid' column is the pharmacokinetics of the section table and FK of the table of thread, the "thrviewednum" the number of views of a thread.

    But I get the error:

    Error in the command line: 1 column: 7

    Error report:

    SQL error: ORA-00937: not a function of simple-group

    I can't understand the problem, could someone help me? Thank you.
    < /p >

    Hello

    Use this

    Select s.secname, sum (sum1) of join of s section

    (select secid, sum1 sum (thrviewednum) of the thread by secid group) THE group s.secid tt = tt.secid by s.secname;

    This is because the select statement contains a column that is not part of any group function, so this column must be there in the group by clause

    Concerning

  • SQL error: ORA-31038: invalid number '420,05' when extracting data from XML

    Hello everyone ,

    J’ai créé dieting

    DBMS_XMLSCHEMA. REGISTERSCHEMA (SCHEMAURL = > 'OrdenDetalle.xsd', SCHEMADOC = > ' <? xml version = "1.0" encoding = "UTF?) 8 "? >

    " < xs: schema xmlns: XS =" http://www.w3.org/2001/XMLSchema ">

    < xs: element name = "Monsigniore" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "Quantity" type = "Integer" / >

    < xs: element name = "FechaCreacion" type = "xs: DateTime" / >

    < xs: element name = "Version" type = "xs: String" / >

    < xs: ELEMENT ref = "News" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < xs: element name = "News" >

    < xs: complexType >

    < xs: Choice >

    < xs: element name = "OrdenCompra" type = "T_OrdenCompra" / >

    < / xs: Choice >

    < / xs: complexType >

    < / xs: element >

    < name XS: complexType = "T_OrdenCompra" >

    < xs: SEQUENCE >

    < xs: element name = "Code" type = "xs: String" / >

    < xs: element name = "Number" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CodigoEstado" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CodigoLicitacion" type = "xs: String" nillable = "true" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Description" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CodigoTipo" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Type" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "TipoMoneda" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "State" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CodigoEstadoProveedor" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "EstadoProveedor" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: ELEMENT ref = "Fechas" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "TieneItems" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "PromedioCalificacion" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CantidadEvaluacion" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Well" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Freighters" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "TotalNeto" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "PorcentajeIva" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Impuestos" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Total" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Financing" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Country" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "TipoDespacho" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "FormaPago" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: ELEMENT ref = "Comprador" minOccurs = "0" maxOccurs = "1" / >

    < xs: ELEMENT ref = "Proveedor" minOccurs = "0" maxOccurs = "1" / >

    < xs: ELEMENT ref = "Items" minOccurs = "0" maxOccurs = "1" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < xs: element name = "Items" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "Quantity" type = "Integer" / >

    < xs: element name = "News" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: ELEMENT ref = "Item" minOccurs = "0" maxOccurs = "unbounded" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < name XS: complexType = "OrdenCompraBusqueda" >

    < xs:complexContent >

    < xs:extension base = "T_OrdenCompra" >

    < / xs:extension >

    < / xs:complexContent >

    < / xs: complexType >

    < xs: element name = "Item" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "Correlativo" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CodigoCategoria" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Category" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CodigoProducto" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Product" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "EspecificacionComprador" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "EspecificacionProveedor" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Quantity" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Moneda" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    "< xs: element name ="PrecioNeto"type ="XS: Decimal"minOccurs ="0"maxOccurs ="1"/ >

    < xs: element name = "TotalCargos" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "TotalDescuentos" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "TotalImpuestos" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Total" type = "xs: Decimal" minOccurs = "0" maxOccurs = "1" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < xs: element name = "Fechas" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "FechaCreacion" type = "xs: DateTime" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "FechaEnvio" type = xs: DateTime "" nillable = "true" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "FechaAceptacion" type = xs: DateTime "" nillable = "true" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "FechaCancelacion" type = xs: DateTime "" nillable = "true" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "FechaUltimaModificacion" type = xs: DateTime "" nillable = "true" minOccurs = "0" maxOccurs = "1" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < xs: element name = "Comprador" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "CodigoOrganismo" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "NombreOrganismo" type = "xs: String" nillable = "true" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "RutUnidad" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CodigoUnidad" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "NombreUnidad" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Activity" type = "xs: String" nillable = "true" / >

    < xs: element name = "DireccionUnidad" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "ComunaUnidad" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "RegionUnidad" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Country" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "NombreContacto" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CargoContacto" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "FonoContacto" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "MailContacto" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < xs: element name = "Proveedor" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "Code" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Number" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Activity" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CodigoSucursal" type = "Integer" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "NombreSucursal" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "RutSucursal" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Address" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Comuna" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Region" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "Country" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "NombreContacto" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "CargoContacto" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "FonoContacto" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < xs: element name = "MailContacto" type = "xs: String" minOccurs = "0" maxOccurs = "1" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < / xs: Schema >

    ', LOCAL = > true, GENTYPES = > false, GENBEAN = > false, GENTABLES = > false,

    FORCE = > false, OPTIONS = > DBMS_XMLSCHEMA. REGISTER_BINARYXML, OWNER = > USER);

    I have a table with one xml domain.

    CREATE TABLE XML_Orden_Detalle (Fecha_GET date default current_date not null,

    Fecha_Ordenes number not null,

    Correlativo_Ordenes number not null,

    Codigo_Orden varchar2 (20) not not null primary key,

    Cant_Item,

    Date of InicioProceso,

    Date of FinProceso,

    Xmltype Orden_Detalle not null)

    Orden_Detalle XMLTYPE COLUMN

    STORE AS BINARY XML

    XMLSCHEMA " " http://xmlns.Oracle.com/xdb/schemas/CCS_XML/OrdenDetalle.xsd "" "

    ELEMENT "command";


    I inserted data like that, without any Errors:

    " < Command containing = ' http://www.w3.org/2001/XMLSchema "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance ">

    < Number > 1 < / quantity >

    < FechaCreacion > 2015-05-28T 12: 10:26.947000 < / FechaCreacion >

    v1 < version > < / Version >

    < Return >

    < OrdenCompra xsi: type = "OrdenCompraBusqueda" >

    3879-2661-SE14 < code > < / code >

    < Number > PSP DAEM 2014.  COFFEE BREAK PARA FRINGE OP21838 < / number >

    < CodigoEstado > 6 < / CodigoEstado >

    3902 5-on 14 < CodigoLicitacion > < / CodigoLicitacion >

    < Description > PSP DAEM 2014.  COFFEE BREAK PARA FRINGE OP21838 < / description >

    < CodigoTipo > 8 < / CodigoTipo >

    < Type > SE < / Type >

    < TipoMoneda > CLP < / TipoMoneda >

    Is < State > < / Estado >

    < CodigoEstadoProveedor > 4 < / CodigoEstadoProveedor >

    Is < EstadoProveedor > < / EstadoProveedor >

    < Fechas >

    < FechaCreacion > 2014-12-29T 17: 43:32.287000 < / FechaCreacion >

    < FechaEnvio > 2014-12-31T 10: 32:35.480000 < / FechaEnvio >

    < FechaAceptacion > 2015 - 01-01 T 21: 03:03.660000 < / FechaAceptacion >

    < FechaCancelacion xsi: Nil = "true" / >

    < FechaUltimaModificacion > 2014-12-29T 17: 51:00.000000 < / FechaUltimaModificacion >

    < / Fechas >

    < TieneItems > 1 < / TieneItems >

    < PromedioCalificacion > 5 < / PromedioCalificacion >

    < CantidadEvaluacion > 1 < / CantidadEvaluacion >

    < Well > 0 < / well >

    cargo <>0 < / cargo >

    < TotalNeto > 53782 < / TotalNeto >

    < PorcentajeIva > 19 < / PorcentajeIva >

    < Impuestos > 10218 < / Impuestos >

    < total > 64000 < / Total >

    < Financing > 1140569 < / financing >

    < Country > CL < / Pais >

    < TipoDespacho > 12 < / TipoDespacho >

    < FormaPago > 2 < / FormaPago >

    < comprador >

    < CodigoOrganismo > 118069 < / CodigoOrganismo >

    < NombreOrganismo > Ilustre municipalidad of Bulnes < / NombreOrganismo >

    < RutUnidad > 69.141.200 - 8 < / RutUnidad >

    < CodigoUnidad > 4799 < / CodigoUnidad >

    Daem < NombreUnidad > < / NombreUnidad >

    < Actividad / >

    < DireccionUnidad > VICTOR BIANCHI Nº415 < / DireccionUnidad >

    Bulnes < ComunaUnidad > < / ComunaUnidad >

    < RegionUnidad > Region del Biobio < / RegionUnidad >

    < Country > CL < / Pais >

    Antonella Brunetti < NombreContacto > < / NombreContacto >

    Adquisiciones < CargoContacto > < / CargoContacto >

    < FonoContacto > 56-42-2204053-2204054 < / FonoContacto >

    < MailContacto > [email protected] < / MailContacto >

    < / comprador >

    < Proveedor >

    < Code > 275020 < / code >

    Luis < number > < / number >

    < Activity > MANUFACTURING OF PAN, BLOCK PANADERIA Y PRODUCTOS < / activity >

    < CodigoSucursal > 280820 < / CodigoSucursal >

    Luis < NombreSucursal > < / NombreSucursal >

    < RutSucursal > 5.940.940 - 9 < / RutSucursal >

    < Address > Carlos Palacios 125 < / address >

    Bulnes < Comuna > < / Comuna >

    Region del Biobio < region > < / region >

    < Country > CL < / Pais >

    < NombreContacto > Luis Leonardo Valdés Landero < / NombreContacto >

    Gerente < CargoContacto > < / CargoContacto >

    < FonoContacto > (56) (42) 631498 < /FonoContacto >

    < MailContacto > [email protected] < / MailContacto >

    < / Proveedor >

    elements <>

    < Quantity > 7 < / quantity >

    < Return >

    < item >

    < Correlativo > 1 < / Correlativo >

    < CodigoCategoria > 30222700 < / CodigoCategoria >

    < Category > items para estructuras, obras y construcciones / permanent Construcciones / industriales Construcciones < / categories >

    < CodigoProducto > 30222703 < / CodigoProducto >

    < product > ALMACEN Mercancias < / product >

    < EspecificacionComprador > 3 LITROS BEBIDAS < / EspecificacionComprador >

    < EspecificacionProveedor / >

    < Number > 10 < / quantity >

    < Moneda > CLP < / Moneda >

    < PrecioNeto > 1550 < / PrecioNeto >

    < TotalCargos > 0 < / TotalCargos >

    < TotalDescuentos > 0 < / TotalDescuentos >

    < TotalImpuestos > 0 < / TotalImpuestos >

    < total > 15500 < / Total >

    < / point >

    < item >

    < Correlativo > 2 < / Correlativo >

    < CodigoCategoria > 30222700 < / CodigoCategoria >

    < Category > items para estructuras, obras y construcciones / permanent Construcciones / industriales Construcciones < / categories >

    < CodigoProducto > 30222703 < / CodigoProducto >

    < product > ALMACEN Mercancias < / product >

    < EspecificacionComprador > DEEMED OF 1 1/2 LITYROS < / EspecificacionComprador >

    < EspecificacionProveedor / >

    < Number > 10 < / quantity >

    < Moneda > CLP < / Moneda >

    < PrecioNeto > 1150 < / PrecioNeto >

    < TotalCargos > 0 < / TotalCargos >

    < TotalDescuentos > 0 < / TotalDescuentos >

    < TotalImpuestos > 0 < / TotalImpuestos >

    < total > 11500 < / Total >

    < / point >

    < item >

    < Correlativo > 3 < / Correlativo >

    < CodigoCategoria > 30222700 < / CodigoCategoria >

    < Category > items para estructuras, obras y construcciones / permanent Construcciones / industriales Construcciones < / categories >

    < CodigoProducto > 30222703 < / CodigoProducto >

    < product > ALMACEN Mercancias < / product >

    < EspecificacionComprador > PACKAGES SERVILLETAS < / EspecificacionComprador >

    < EspecificacionProveedor / >

    < Number > 8 < / quantity >

    < Moneda > CLP < / Moneda >

    < PrecioNeto > 170 < / PrecioNeto >

    < TotalCargos > 0 < / TotalCargos >

    < TotalDescuentos > 0 < / TotalDescuentos >

    < TotalImpuestos > 0 < / TotalImpuestos >

    < total > 1360 < / Total >

    < / point >

    < item >

    < Correlativo > 4 < / Correlativo >

    < CodigoCategoria > 30222700 < / CodigoCategoria >

    < Category > items para estructuras, obras y construcciones / permanent Construcciones / industriales Construcciones < / categories >

    < CodigoProducto > 30222703 < / CodigoProducto >

    < product > ALMACEN Mercancias < / product >

    < EspecificacionComprador > pounds OF AZÚCAR < / EspecificacionComprador >

    < EspecificacionProveedor / >

    < Number > 5 < / quantity >

    < Moneda > CLP < / Moneda >

    < PrecioNeto > 580 < / PrecioNeto >

    < TotalCargos > 0 < / TotalCargos >

    < TotalDescuentos > 0 < / TotalDescuentos >

    < TotalImpuestos > 0 < / TotalImpuestos >

    < total > 2900 < / Total >

    < / point >

    < item >

    < Correlativo > 5 < / Correlativo >

    < CodigoCategoria > 30222700 < / CodigoCategoria >

    < Category > items para estructuras, obras y construcciones / permanent Construcciones / industriales Construcciones < / categories >

    < CodigoProducto > 30222703 < / CodigoProducto >

    < product > ALMACEN Mercancias < / product >

    < EspecificacionComprador > NESCAFE < / EspecificacionComprador >

    < EspecificacionProveedor / >

    < Number > 2 < / quantity >

    < Moneda > CLP < / Moneda >

    < PrecioNeto > 3900 < / PrecioNeto >

    < TotalCargos > 0 < / TotalCargos >

    < TotalDescuentos > 0 < / TotalDescuentos >

    < TotalImpuestos > 0 < / TotalImpuestos >

    < total > 7800 < / Total >

    < / point >

    < item >

    < Correlativo > 6 < / Correlativo >

    < CodigoCategoria > 30222700 < / CodigoCategoria >

    < Category > items para estructuras, obras y construcciones / permanent Construcciones / industriales Construcciones < / categories >

    < CodigoProducto > 30222703 < / CodigoProducto >

    < product > ALMACEN Mercancias < / product >

    < EspecificacionComprador > CAJAS OF TE 20 BOWL < / EspecificacionComprador >

    < EspecificacionProveedor / >

    < Number > 5 < / quantity >

    < Moneda > CLP < / Moneda >

    < PrecioNeto > 340 < / PrecioNeto >

    < TotalCargos > 0 < / TotalCargos >

    < TotalDescuentos > 0 < / TotalDescuentos >

    < TotalImpuestos > 0 < / TotalImpuestos >

    < total > 1700 < / Total >

    < / point >

    < item >

    < Correlativo > 7 < / Correlativo >

    < CodigoCategoria > 30222700 < / CodigoCategoria >

    < Category > items para estructuras, obras y construcciones / permanent Construcciones / industriales Construcciones < / categories >

    < CodigoProducto > 30222703 < / CodigoProducto >

    < product > ALMACEN Mercancias < / product >

    TRITON GALLETAS < EspecificacionComprador > < / EspecificacionComprador >

    < EspecificacionProveedor / >

    < Number > 31 < / quantity >

    < Moneda > CLP < / Moneda >

    < PrecioNeto >420,05< / PrecioNeto >

    < TotalCargos > 0 < / TotalCargos >

    < TotalDescuentos > 0 < / TotalDescuentos >

    < TotalImpuestos > 0 < / TotalImpuestos >

    < total > 13021,550000000001 < / Total >

    < / point >

    < / News >

    < / object >

    < / OrdenCompra >

    < / News >

    < / Monsigniore >

    However when I extract data, for example:


    Select *.

    from xmltable (to_char (' / Monsigniore/news/OrdenCompra/Items/News/Item[1] ''))

    passage (select Orden_Detalle

    of xml_Orden_Detalle

    where Fecha_Ordenes = 20150101 and Correlativo_ordenes = 83)

    path of columns Correlativo varchar2 (15) 'Correlativo '.

    , Path of varchar2 (15) CodigoCategoria 'CodigoCategoria '.

    , Path Categoria Varchar2 (100 CHAR) "category.

    , Path of varchar2 (15) CodigoProducto 'CodigoProducto '.

    , Path of Producto Varchar2 (100 CHAR) 'product '.

    , Path of the EspecificacionComprador Varchar2 (100 CHAR) "EspecificacionComprador".

    , Path of the EspecificacionProveedor Varchar2 (100 CHAR) "EspecificacionProveedor".

    , Amount varchar2 (15) path 'amount '.

    , Path of the Moneda Varchar2 (16 CHAR) "Moneda".

    , Path of varchar2 (15) PrecioNeto 'PrecioNeto '.

    , Path of varchar2 (15) TotalCargos 'TotalCargos '.

    , Path of varchar2 (15) TotalDescuentos 'TotalDescuentos '.

    , Path of varchar2 (15) TotalImpuestos 'TotalImpuestos '.

    , Path of varchar2 (15) total 'Total '.

    );


    delivery the following error:


    Informed of error:

    SQL error: ORA-31038: Valor number no valido: "420,05."

    «31038 00000 - "value not valid %s: \"%s\»»

    * Cause: The text in the XML document does not represent a valid

    value given the data type and other constraints in the schema.

    * Action: Make sure the value specified in the XML documents is valid

    regarding the data type and other constraints in the schema.

    Note that extract le agenda [1] but the reported error is à la point [7]

    Please If anyone can Help me with le solution for no report error

    Thank you very much in advance

    Carlos

    in Chile, the decimal point are ', 'no'.', the xml data table is OK for us

    You do not understand.

    Regardless of the locale, numeric values limited by a type of data XS: Decimal must use a point in a correct XML representation, otherwise, the document is not valid by the XSD.

    (3) TO_CHAR (...) the code is part of a procedure

    Again, do NOT build a dynamic path like that.

    Why not just move through the records returned by the query (if you need close at all)?


    FOR rec in)

    SELECT x.*

    From your_table t

    XMLTABLE (...) x

    )

    LOOP

    END LOOP;


    What is the role of the v_CantItems variable? Paging?

    Whence its value?

  • SQL error: ORA-00979: not a GROUP BY

    Hi team,

    I am trying to execute the query

    SELECT DISTINCT comp.company_name |' -' || COMP.contract_number AS 'company_name '.

    , UPPER (bh.first_name) AS 'budget_holder '.

    , INITCAP (sup.first_name) |' -' || SUP. Surname AS 'supervisor '.

    , INITCAP (emp.status) AS "Department".

    , INITCAP (emp.first_name |) » '|| EMP. Surname) AS "employee."

    r.employee_id

    , emp.paaf_number AS 'paaf_num '.

    , emp.employee_payroll_number AS 'payroll_num '.

    , emp.discipline AS 'discipline '.

    , NVL (SUM (tg.week_day1), 0) AS "day 1".

    , NVL (SUM (tg.week_day2), 0) AS "day 2".

    , NVL (SUM (tg.week_day3), 0) AS day '3 '.

    , NVL (SUM (tg.week_day4), 0) AS "day4.

    , NVL (SUM (tg.week_day5), 0) AS "day5".

    , NVL (SUM (tg.week_day6), 0) AS "day6.

    , NVL (SUM (tg.week_day7), 0) AS "day 7".

    r.valid_from

    r.valid_to

    Tw_roster_data r

    JOIN tw_employee emp

    ON emp.employee_id = r.employee_id

    JOIN tg tw_timesheet_stage

    ON tg.employee_id = r.employee_id

    AND tg.week_commencing = r.valid_from

    JOIN the tw_contracting_company comp

    ON comp.contracting_company_id = r.contracting_company_id

    JOIN tw_supervisor sup

    ON sup.supervisor_id = tg.supervisor_id

    JOIN tw_budget_holder bh

    ON bh.budget_holder_id = sup.budget_holder_id

    WHERE r.contracting_company_id = 101

    AND r.VALID_FROM = January 31, 2015.

    AND r.VALID_TO = February 6, 2015"

    Group of r.employee_id, comp.company_name, bh.first_name,

    EMP.paaf_number, emp.employee_payroll_number, emp.discipline,

    r.valid_from, r.valid_to;

    But still the error below

    Error in the command line: 1 column: 17

    Error report-

    SQL error: ORA-00979: not a GROUP BY expression

    00979 00000 - "not a GROUP BY expression"

    Can help.

    Hello

    When to use analytical function oracle other columns used based on the analysis, must be included in the GROUP BY Clause

    SELECT expression1, expression2, ... expression_n,
      aggregate_function (expression)
    FROM tables
    WHERE conditions
    GROUP BY expression1, expression2, ... expression_n;
    

    SQL 101: Seen are medium and other aggregate data

      SELECT DISTINCT
             comp.company_name || ' - ' || comp.contract_number AS "company_name",
             UPPER (bh.first_name) AS "budget_holder",
             INITCAP (sup.first_name) || ' - ' || sup.surname AS "supervisor",
             INITCAP (emp.status) AS "department",
             INITCAP (emp.first_name || ' ' || emp.surname) AS "employee",
             r.employee_id,
             emp.paaf_number AS "paaf_num",
             emp.employee_payroll_number AS "payroll_num",
             emp.discipline AS "discipline",
             NVL (SUM (tg.week_day1), 0) AS "day1",
             NVL (SUM (tg.week_day2), 0) AS "day2",
             NVL (SUM (tg.week_day3), 0) AS "day3",
             NVL (SUM (tg.week_day4), 0) AS "day4",
             NVL (SUM (tg.week_day5), 0) AS "day5",
             NVL (SUM (tg.week_day6), 0) AS "day6",
             NVL (SUM (tg.week_day7), 0) AS "day7",
             r.valid_from,
             r.valid_to
        FROM tw_roster_data r
             JOIN tw_employee emp
                ON emp.employee_id = r.employee_id
             JOIN tw_timesheet_stage tg
                ON tg.employee_id = r.employee_id
                   AND tg.week_commencing = r.valid_from
             JOIN tw_contracting_company comp
                ON comp.contracting_company_id = r.contracting_company_id
             JOIN tw_supervisor sup
                ON sup.supervisor_id = tg.supervisor_id
             JOIN tw_budget_holder bh
                ON bh.budget_holder_id = sup.budget_holder_id
       WHERE     r.contracting_company_id = 101
             AND r.VALID_FROM = '31-JAN-2015'
             AND r.VALID_TO = '06-FEB-2015'
    GROUP BY
    comp.contract_number
    ,comp.company_name
    ,bh.first_name
    ,sup.first_name
    ,sup.surname
    , emp.status
    ,emp.first_name
    ,emp.surname
    r.employee_id,
    emp.paaf_number,
    emp.employee_payroll_number,
    emp.discipline,
     r.valid_from,
     r.valid_to;
    
  • SQL error: ORA-01031: insufficient privileges

    I am trying to create a view. I logged as a DBA. Please suggest.

    create or replace view tspace_vw as

    SELECT tablespace_name,

    Total_Size 'Total_Size (MB).

    Free_space "Free_Space (MB).

    (Total_size - free_space) "USED_SPACE (MB).

    round (((Total_size-Free_Space)/Total_size) * 100, 2) | ' %' "% USED.

    DE)

    SELECT a.tablespace_name,

    Round(sum(a.bytes)/1024/1024,2) Total_Size,.

    Round(sum(b.free_bytes)/1024/1024,2) free_space

    FROM dba_data_files a, (SELECT file_id, SUM (bytes) free_bytes

    FROM dba_free_space

    GROUP BY file_id

    ) b

    WHERE a.file_id = b.file_id

    and nom_tablespace not in ('SYSTEM', 'SYSAUX', 'UNDOTBS1', 'TEMP')

    GROUP BY a.tablespace_name

    )

    ORDER BY nom_tablespace;

    ================================================

    SQL error: ORA-01031: insufficient privileges

    01031 00000 - "insufficient privileges".

    978487 wrote:

    I am trying to create a view. I logged as a DBA. Please suggest.

    SQL error: ORA-01031: insufficient privileges

    01031 00000 - "insufficient privileges".

    You must grant the right to SELECT user views the two system.

    >

    Grant select on dba_data_files Scott;

    Grant select on dba_free_space Scott;

    >

    I'm assuming that "connected is a DBA" means that you granted the DBA role to the user. But you need to grant privileges directly so that they are able to create a view.

    See CREATE VIEW in the doc of the SQL language

    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_8004.htm

    >

    The owner of the schema containing the view must have the necessary privileges to either select, insert, update, or delete rows from all tables or views on which the opinion is based. The owner must grant these privileges directly, rather than through a role.

    >

  • SQL error: ORA-00910: specified length too long for its data type

    Using Oracle 11.2.0.1 on Oracle Linux 5.8 x 64

    I try to install Zabbix http://www.zabbix.com and uses the Oracle database as the data store. The script of the diagram provided below does not work.
    CREATE TABLE maintenances (
         maintenanceid            number(20)                                NOT NULL,
         name                     nvarchar2(128)  DEFAULT ''                ,
         maintenance_type         number(10)      DEFAULT '0'               NOT NULL,
         description              nvarchar2(2048) DEFAULT ''                ,
         active_since             number(10)      DEFAULT '0'               NOT NULL,
         active_till              number(10)      DEFAULT '0'               NOT NULL,
         PRIMARY KEY (maintenanceid)
    );
    When I run it, I get
    Error at Command Line:5 Column:42
    Error report:
    SQL Error: ORA-00910: specified length too long for its datatype
    00910. 00000 -  "specified length too long for its datatype"
    *Cause:    for datatypes CHAR and RAW, the length specified was > 2000;
               otherwise, the length specified was > 4000.
    *Action:   use a shorter length or switch to a datatype permitting a
               longer length such as a VARCHAR2, LONG CHAR, or LONG RAW
    According to the oracle documentation for nvarchar2 limit is 4000. What am I missing here?

    "4000 bytes is the ultimate maximum." You can say 4000 * characters *, but it will always be limited to 4000 * bytes *. "
    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:1224836384599 #201073000346459201\

    "The maximum length of the column is determined by the definition of national character set. The width of the character NVARCHAR2 data specifications match the number of characters. The authorized maximum column size is 4000 bytes. »
    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/sql_elements001.htm#SQLRF50976

    Furthermore, you treat numbers as STRINGS, remove the quotes around your zero.

  • SQL error: ORA-01873: the interval leading precision is too small

    Hello

    My requirement is to get the current timestamp in the format microsec Epoch.

    I am trying to execute the following query

    Select (CAST (((current_timestamp-TO_DATE (1er janvier 1970 00:00:00 ', ' 'JJ-MM-AAAA HH24:MI:SS)) * 24 * 60 * 60 * 1000000) AS varchar (32))) as "dt" from dual;))

    I get the following error
    Error from the 1 in the command line:
    Select (CAST (((current_timestamp-TO_DATE (1er janvier 1970 00:00:00 ', ' 'JJ-MM-AAAA HH24:MI:SS)) * 24 * 60 * 60 * 1000000) AS varchar (32))) as double 'dt'))
    Error report:
    SQL error: ORA-01873: the interval leading precision is too small
    01873 00000 - "the interval leading precision is too small."
    * Cause: The precision of the interval leading is too small to store the
    specified interval.
    * Action: Increase the accuracy of foreground of the interval or specify a
    meantime, with smaller leading precision.

    But if I tried to do
    Select (CAST (((sysdate-TO_DATE (1er janvier 1970 00:00:00 ', ' 'JJ-MM-AAAA HH24:MI:SS)) * 24 * 60 * 60 * 1000000) AS varchar (32))) as "dt" from dual;))
    works fine, but I get the bad epochtime sysdate has no time zone information.

    Please help me how to do the first query to work so that I can get the current_timestamp change to gmt and convert it in time.
    Please let me know if there is another way to get the Epochtime.

    Depending on whether you want to or not to include the fraction of a second use:

    with t as (
               select  current_timestamp at time zone 'gmt' - to_timestamp_tz('01/01/1970 00:00:00 GMT','MM-DD-YYYY HH24:MI:SS TZR') interval_diff,
                       cast(current_timestamp at time zone 'gmt' as date) - to_date('01/01/1970 00:00:00', 'MM-DD-YYYY HH24:MI:SS') num_diff
                 from  dual
              )
    select  cast(
                 (
                  (
                   (
                    extract(day from interval_diff) * 24 + extract(hour from interval_diff)
                   ) * 60 + extract(minute from interval_diff)
                  ) * 60 + extract(second from interval_diff)
                 ) * 1000000
                 AS varchar(32)
                ) as "ts",
            cast(num_diff * 24 * 60 * 60 * 1000000 AS varchar(32)) as "dt"
      from t
    / 
    
    ts                   dt
    -------------------- --------------------
    1336237158093000     1336237158000000
    
    SQL>  
    

    SY.

  • Get an error SQL Error: ORA-01407:

    Hi all

    When iam trying to remove some rows from a table, iam getting the following error:

    Error from the 1 in the command line:
    delete from cu_cdm_svc_job_STEP where SVC_JOB_KEY = 292
    Error report:
    SQL error: ORA-01407: cannot update ("FACETS_CUSTOM". "" "" CDM_SVC_JOB_STEP '. "" SVC_JOB_KEY') with the NULL value
    01407 00000 - "can not update (%s) null.
    * Cause:
    * Action:

    Kindly help. Thanks in advance.

    Hello and welcome!

    You have foreign keys hanging out, doing so ON DELETE SET NULL?

  • Using Merge in oracle 11g this error SQL Error: ORA-30926: failed to get a stable set of rows in the source tables

    whenever I run this code I get this error

    SQL Error: ORA-30926: failed to get a stable set of rows in the source tables

    30926 00000 - "impossible to get a stable set of rows in the source tables.

    * Cause: A stable set of rows could not be achieved due to the large dml

    activity or one not deterministic where clause.

    * Action: Remove any non deterministic of the clauses and reissue of the dml.

    Don't know wht goes wrong!


    SQL:

    MERGE IN VENDORS_ACTIVE_DATE s

    USING (nvl (d.VENDOR, s.VENDOR) selection of the SELLER,

    NVL (d.COMPANY_CODE, s.COMPANY_CODE) COMPANY_CODE.

    (case when ((d.VENDOR = s.VENDOR) and (d.COMPANY_CODE = s.COMPANY_CODE)))

    )

    then "MATCH".

    When d.COMPANY_CODE is null

    then 'DELETE '.

    When s.COMPANY_CODE is null

    then "INSERT."

    else 'UPDATE '.

    chck end)

    from (select * from VENDORS_ACTIVE_DATE where COMPANY_CODE = 2) s

    full outer join (select * provider where COMPANY_CODE = 2) d

    on (d.COMPANY_CODE = s.COMPANY_CODE AND s.COMPANY_CODE = 2)

    ) d

    WE (d.COMPANY_CODE = s.COMPANY_CODE AND d.chck in ('UPDATE', 'GAME', 'DELETE'))

    WHEN MATCHED THEN

    UPDATE SET s.VENDOR = d.VENDOR

    WHERE d.chck in ('UPDATE', 'DELETE')

    DELETE WHERE d.chck = 'DELETE '.

    WHEN NOT MATCHED THEN

    INSERT (SELLER, COMPANY_CODE)

    VALUES (d.VENDOR, d.COMPANY_CODE)

    Work request: (deleted the duplicate data in tables (source and target))

    MERGE IN VENDORS_ACTIVE_DATE s

    USING (nvl (d.VENDOR, s.VENDOR) selection of the SELLER,

    NVL (d.ACTIVEDATE, s.ACTIVEDATE) ACTIVEDATE.

    NVL (d.COMPANY_CODE, s.COMPANY_CODE) COMPANY_CODE.

    (case when ((d.VENDOR = s.VENDOR))

    - AND D.ACTIVEDATE = S.ACTIVEDATE

    and NVL (d.ACTIVEDATE, trunc (sysdate)) = NVL (s.ACTIVEDATE, trunc (sysdate))

    and (d.COMPANY_CODE = s.COMPANY_CODE)

    )

    then "MATCH".

    When d.COMPANY_CODE is null

    then 'DELETE '.

    When s.COMPANY_CODE is null

    then "INSERT."

    else 'UPDATE '.

    chck end)

    from (select * from suppliers where COMPANY_CODE = 2) d

    full outer join (select * from vendors_active_date where COMPANY_CODE = 2) s

    on (d.COMPANY_CODE = s.COMPANY_CODE and s.vendor = d.vendor)

    ) d

    WE (d.COMPANY_CODE = s.COMPANY_CODE AND d.VENDOR = s.VENDOR AND d.chck in ('UPDATE', 'GAME', 'DELETE'))

    WHEN MATCHED THEN

    S.ACTIVEDATE = UPDATE SET d.ACTIVEDATE

    WHERE d.chck in ('UPDATE', 'DELETE')

    DELETE WHERE d.chck = 'DELETE '.

    WHEN NOT MATCHED THEN

    INSERT (VENDOR, ACTIVEDATE, COMPANY_CODE)

    VALUES (d.VENDOR, d.ACTIVEDATE, d.COMPANY_CODE)

  • Changing table - SQL error: ORA-04091: table XYZ is changing, function of triggering/can not see

    Hi all

    I am a newbie to Oracle and I am faced with the above error. Please see the below code snippets. Can someone please tell what I am doing wrong? Thank you in advance.

    Thank you

    CREATE TABLE ABC

    (

    ID VARCHAR2 ENABLE NUMBER NOT NULL,

    FIELD1 ACTIVATE THE NUMBER NOT NULL,

    FIELD2 ACTIVATE THE VARCHAR2 (8 BYTE) NOT NULL,

    CONSTRAINT JOB_PK PRIMARY KEY (ID)

    )

    ;

    CREATE TABLE XYZ

    (

    ACTIVATE THE NUMBER 4 R_ID NOT NULL,.

    ID VARCHAR2 ENABLE NUMBER NOT NULL,

    Column1 NUMBER (2.0) default 0.00,.

    Column2 NUMBER (2.0) default 0.00,.

    COLUMN3 NUMBER (2.0).

    NUMBER (2.0) TOTAL 0.00 default.

    CONSTRAINT TRIP_PAYMENT_PK PRIMARY KEY (ID)

    )

    ;

    create or replace trigger trigger1

    After Insert on XYZ

    for each line

    Declare

    number of newTotal;

    Start

    newTOTAL: =: new. Column1 +: new. Column2 +: new. COLUMN3;

    setting a day of XYZ together Total = newTotal;

    end;

    Insert into ABC (1, 45, ' Demo');

    insertion in XYZ (1, 1, 12.50, 10.20 33,50, ");

    Error report:

    SQL error: ORA-04091: table XYZ is changing, function of triggering/can not see

    Try one before line

    create or replace trigger trigger1

    before inserting on XYZ

    for each line

    Start
    : new. TOTAL: =: new. Column1 +: new. Column2 +: new. COLUMN3;
    end;

  • SQL error: ORA-01779: cannot modify a column that matches a key examine

    Hi all

    The requirement is that I have two tables s_party_d and S_CONTACT_d. the need to update the column name with FST_NAME | ',' | Last_name when column rowid in both tables are equal. I used the query previously below: -.

    Update
    (select
    E1. Name,
    e.FST_NAME,
    Select
    Of
    s_party_d e1,
    E S_CONTACT_d
    where
    E1. Game of ROW_ID = e.ROW_ID)
    name = FST_NAME | ',' | LAST_NAME;

    But I get the error message when executing the query

    Error in the command line: 31 column: 3
    Error report:
    SQL error: ORA-01779: cannot modify a column that is mapped to a table not preserved key
    01779 00000 - 'impossible to change a column that is mapped to a non-preserved table at key'
    * Cause: An attempt was made to insert or update columns in a join finds out who
    map to a table not kept the key.
    * Action: Change the directly underlying base tables.

    Can U please tell me why this error and how to solve?

    Thank you
    Mathon

    Mathon wrote:

    So, I have to look into some other method... I can't achieve this using a single update statement...

    Well, no matter what you do you need to decide what FST_NAME | ',' | Name to use. As I already pointed out for each line of the line of the s_party_d table there are several rows in table S_CONTACT_d. Again, you must yo decide what S_CONTACT_d table row you want to use. For example:

    update s_party_d e1
       set e1.name = (
                      select  max(e.FST_NAME) ||', '|| max(e.LAST_NAME)
                        from  S_CONTACT_d e
                        where e1.ROW_ID=e.ROW_ID
                     )
     where e1.ROW_ID in (
                         select  e.ROW_ID
                           from  S_CONTACT_d e
                        )
    /
    

    SY.

  • SQL error: ORA-01840: value not long enough for the format of the date of entry

    It is a delete SQL in a driver of demand, which gives no error, but does remove all the lines either. I have converted the removal 'from' to ' Select * ' and may see the following error:

    Select * FROM PS_GPDE_DV_TRIG40 WHERE EXISTS (SELECT FROM 'X'
    PS_GPDE_DV_ELIG_MO ELG WHERE ELG. EMPLID = PS_GPDE_DV_TRIG40. EMPLID AND
    ELG. EMPL_RCD = PS_GPDE_DV_TRIG40. EMPL_RCD AND TO_DATE (TO_CHAR (ELG. PRD_END_DT
    "YYYY"). TO_CHAR (ELG. PRD_END_DT, "MM"). '01', "YYYY-MM-DD") =.
    PS_GPDE_DV_TRIG40. GPDE_DV_EVT_EFFDT AND ELG. CAL_RUN_ID = "CAL_0812")
    Error report:
    SQL error: ORA-01840: value not long enough for the format of the date of entry


    The interesting thing is that if I attach a condition of emplid, then the SQL above does not give an error and return lines:

    Select * FROM PS_GPDE_DV_TRIG40 WHERE EXISTS (SELECT FROM 'X'
    PS_GPDE_DV_ELIG_MO ELG WHERE ELG. EMPLID = PS_GPDE_DV_TRIG40. EMPLID AND
    ELG. EMPL_RCD = PS_GPDE_DV_TRIG40. EMPL_RCD AND TO_DATE (TO_CHAR (ELG. PRD_END_DT
    "YYYY"). TO_CHAR (ELG. PRD_END_DT, "MM"). '01', "YYYY-MM-DD") =.
    PS_GPDE_DV_TRIG40. GPDE_DV_EVT_EFFDT AND ELG. CAL_RUN_ID = "FM_CG_0812")
    and emplid = "1234"

    now, if the number of lines is identified (by giving more number of emplids), it begins to give the error when the number of rows returned is greater than about 30. It is completely independent of what employee is used, so there is no question of data dependence.

    Function optimizer cost is off and a subquery nest is off on the init.ora file

    subquery UNNEST= false

    optimizercost_based_transformation = off


    I don't know if it has something to do with this problem.

    Explanations would be welcome!

    Thank you
    Vikas

    I think it is question of data combined with a not very sensible date format mask (it could fail when the null data, because of your concatenation with '01' and work when not null data).
    Have you tried with a simple TRUNC?

    Your code:

    ...TO_DATE(TO_CHAR(ELG.PRD_END_DT, 'YYYY') || TO_CHAR(ELG.PRD_END_DT , 'MM') || '01' , 'YYYY-MM-DD') =PS_GPDE_DV_TRIG40.GPDE_DV_EVT_EFFDT...
    

    After change:

    ...TRUNC(ELG.PRD_END_DT , 'MM') =PS_GPDE_DV_TRIG40.GPDE_DV_EVT_EFFDT...
    

    Nicolas.

  • Developer SQL error: ORA-12505. TNS:listner is not currently of SID given in connect descriptor

    Hello guys, I know this question has been posted on several occasions in the past, but my question includes developer oracle sql only. I can use the database and all the features through sql * more even execute sql queries. but when it comes to developer sql always returns this error. (error: ORA-12505.)

    Windows 8-64 oracle 11 g r2

    --------------------------------------------------------------------------------------------------------------------------------------

    Welcome to LSNRCTL, enter 'help' for more information.

    LSNRCTL > status

    Connection to (ADDRESS = (PROTOCOL = tcp)(HOST=) (PORT = 1521))

    STATUS of the LISTENER

    ------------------------

    Alias auditeur1

    TNSLSNR for Windows 64-bit version: Version 11.2.0.1.0 - Production

    Start date August 11, 2014 13:08:08

    Uptime 0 days 0 h 14 min 55 sec

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    Listener parameter File C:\app\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora

    C:\app\oracle\diag\tnslsnr\Needo-pc\listener1\alert\log.XML log listener

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = Needo-pc)(PORT=1521)))

    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))

    Summary of services...

    Service 'CLRExtProc' has 1 instance (s).

    Instance of 'CLRExtProc', status UNKNOWN, has 3 service management...

    Service "orcl" has 1 instance (s).

    Instance "orcl", State LOAN, has 1 operation for this service...

    Service 'orclXDB' has 1 instance (s).

    Instance "orcl", State LOAN, has 1 operation for this service...

    The command completed successfully

    -----------------------------------------------------------------------------------------------------------------

    LSNRCTL > services

    Connection to (ADDRESS = (PROTOCOL = tcp)(HOST=) (PORT = 1521))

    Summary of services...

    Service 'CLRExtProc' has 1 instance (s).

    Instance of 'CLRExtProc', status UNKNOWN, has 3 service management...

    Managers:

    "DEDICATED" set up: 0 denied: 0

    LOCAL SERVER

    "ORACLE SERVER" put in place: 0 denied: current: 0 0 max: 25 status: ready

    CLRExtProc

    (ADDRESS = (PROTOCOL = ipc) (PIPENAME=\\.\pipe\NTN_122C_C6D0FCF3. ORA))

    "ORACLE SERVER" put in place: 0 denied: current: 0 0 max: 25 status: ready

    CLRExtProc

    (ADDRESS = (PROTOCOL = ipc) (PIPENAME=\\.\pipe\NTN_122C_C6D0FCF3. ORA))

    Service "orcl" has 1 instance (s).

    Instance "orcl", State LOAN, has 1 operation for this service...

    Managers:

    "DEDICATED" set up: 22 refused: 0 status: ready

    LOCAL SERVER

    Service 'orclXDB' has 1 instance (s).

    Instance "orcl", State LOAN, has 1 operation for this service...

    Managers:

    "D000" put in place: 0 denied: current: 0 0 max: 1022 State: loan

    DISPATCHER < machine: NEEDO-PC, pid: 3172 >

    (ADDRESS = (PROTOCOL = tcp) (HOST = Needo-pc)(PORT=52654))

    The command completed successfully

    ------------------------------------------------------------------------------------------

    Thank you!

    Try it with sid ORCL instead of XE.

    If this does not help, then choose SERVICE_NAME orcl instead of SID in sql developer.

    Your listener seems to have an entry for this.

    You can also test it in SQl * more. But what you've done so far in SQl * plus was a "server connection", without providing the database.

    Because in your case, the client and the server is on the same machine, it works with sql * more.

    If you try a customer coonnect by specifying the database, then you would do the same thing as the Oracle SQL Developer is by train.

    For test purposes, something like

    sqlplus user/pwd@host:port/ORCL

    also in the Sqlnet.ora file must be an etry for local EZCONNECT connect method. I don't know if it is set during the installation of network by default.


    You can try if there is an Alias-TNS name (configured in the tnsnames.ora)

    sqlplus user/pwd@ORCL


    If it works with sql * plus, so you must always indicate the sql developer where the tnsnames.ora file is located on your computer.

    The setting can be found in the menu: extras/tools/base data/improved

    The tnsnames.ora file is usually in a file like this:

    C:\Oracle\product\11.2.0\client_1\network\admin


  • Select this OPTION to generate XML data from the table using XMLELEMENT, XMLAGG gives error ORA-19011 string buffer too small

    My select statement fails with the error:


    The ORA-19011 string buffer too small


    The select statement looks like:


    SELECT TO_CLOB)

    XMLELEMENT ("accounts",

    XMLELEMENT ("count",

    XMLATTRIBUTES)

    rownum AS "recordId."

    To_date('20130520','YYYYMMDD') AS "datestarted."

    123456 AS "previousBatchId."

    56789 AS 'previousRecordId '.

    ),

    ....

    .... .

    .....

    XMLFOREST)

    SIG_ROLE AS "SignatoryRole."

    To_char(TRANSFER_DATE,'YYYY-mm-DD') AS "TransferDate."

    NVL(Reason,0) AS 'reason '.

    ) AS the 'transfer '.

    )

    ()) AS CRDTRPT

    OF ANY_TABLE;

    • It looks like I can choose only 4000 characters using the SELECT statement (please, correct me if I'm wrong)

    I'd use the XMLGEN package. But the environment team says no mounted drives in the future with the arrival of the EXADATA.

    NO HARD DRIVE MOUNTED, NO ACCESS TO THE DATABASE DIRECTORIES

    No UTL_FILE

    I need to use the REEL spool the resulting XML data of the SELECT query.

    SQL is a standard in my org, but I can do with a PL/SQL solution also to load data into a table (cannot use a COIL with PL/SQL)

    What I do is:

    1. a column of type CLOB to a xml_report of the loading of the above SELECT query table
    2. Then using SELECT * FROM xml_report to SPOOL the data to a file report.xml

    No need of XMLTYPE data behind. Xml data stream is fine for me.

    In addition, I need to validate the XML file, also using XSD.

    Problem is that the resulting lines of the select query are supposed to be from 15000 to 20000 bytes long.

    Oracle database version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    A Suggestion or a solution to this problem would be appreciated.

    (Sorry for the use of "BOLD", just to make it more readable and highlight the imp points)

    Bravo!

    Rahul

    It looks like I can choose only 4000 characters using the SELECT statement (please, correct me if I'm wrong)

    You use the right method.

    There is an implicit conversion from XMLType to the data type VARCHAR2 as expected by the function TO_CLOB, where the limitation, and the error.

    To serialize XMLType to CLOB, use the XMLSerialize function:

    SELECT XMLSerialize (DOCUMENT

    XMLELEMENT ("accounts",

    ...

    )

    )

    OF ANY_TABLE;

    For the rest of the requirement, I wish you good luck trying to spool the XML correctly.

    You may need to play around with the SET LONG and SET LONGCHUNKSIZE commands to operate.

  • Lineage tracing an SQL error: ORA-22813: value of the operand exceeds the limits of the system

    Hi all

    I started playing with OEMM and I get the following error when I try to 'Trace Data Impact' in an Oracle table. Here's what I do:

    • I created a template and collected a few schemas/tables:

    Capture.JPG

    Capture1.JPG

    • Now when I try to "Trace Data Impact' on the table AP_DEF_STG, I get the following:

    Capture2.JPG

    Capture3.JPG

    Capture4.JPG

    I already tried to create a "Configuration" for her, I tried to text instead of graphics, but the error is the same. If I go to a view of Oracle and do a "track Data Lineage", I get the same error again.


    That someone was already been in this situation? This is the full error trace:


    ({"error": true, "errorMessage": "SQL error during the tracing of lineage: ORA-22813: value of the operand exceeds the limits of the system"})

    ', 'errorType': 'Line error', 'errorCodes': "[LNGTRC_E0016]".

    ","stackTrace":"Error Codes - [LNGTRC_E0016].

    Request - VizModelLineage

    Settings - showInternalObject [false] showNoType [true] showControlLinks [false] startingIds [17 #4723 #0] isBizUI [false] ObjectID [17 #1 #0] showSummaryView [true] collapseLevel [features] resetCache [fake] profile [] showMappingsAsNodes [true] skipCache [false] tracingDirection [3] tracingType [DataLineage] [ReportTree2202015-104855025] originalStartingObject cacheId [17 #4723 #0] viewType actionType [loadlineage] of viewId [ReportTree2202015-104855025] [ModelLineage]

    MITI.web.common.exceptions.LineageUIException: SQL for tracing line error: ORA-22813: value of the operand exceeds the limits of the system

    at MITI.web.common.service.facades.LineageFacadeImpl.getLineageGraph (LineageFacadeImpl.java:284)

    at MITI.flash.tabs.VizModelLineage.getLineageTree (VizModelLineage.java:429)

    at MITI.flash.tabs.VizModelLineage.buildLineageGraph (VizModelLineage.java:356)

    at MITI.flash.tabs.VizModelLineage.performAction (VizModelLineage.java:148)

    at MITI.server.servlets.FlashServlet.doPost (FlashServlet.java:156)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)

    to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.java:611)

    to org.apache.tomcat.util.net.JIoEndpoint$ SocketProcessor.run (JIoEndpoint.java:316)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:895)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:918)

    to org.apache.tomcat.util.threads.TaskThread$ WrappingRunnable.run (TaskThread.java:61)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: MITI.server.services.lineage.LineageException: (LNGTRC_E0016) SQL error during the tracing of lineage: ORA-22813: value of the operand exceeds the limits of the system

    at MITI.server.services.lineage.database.LineageDataSource.handle (LineageDataSource.java:41)

    at MITI.util.database.CommonDataSource.handleSQLException (CommonDataSource.java:124)

    at MITI.util.database.CommonDataSource.executeTransaction (CommonDataSource.java:83)

    at MITI.util.database.CommonDataSource.executeStatement (CommonDataSource.java:54)

    at MITI.server.services.lineage.impl.LineageImpl.traceLineage (LineageImpl.java:554)

    at MITI.server.services.lineage.common.LineageTracer.traceLineage (LineageTracer.java:1078)

    at MITI.server.services.lineage.common.LineageTracer.traceDataLineage (LineageTracer.java:313)

    at MITI.server.services.lineage.common.LineageTracer.traceTechnicalData (LineageTracer.java:176)

    at MITI.web.common.service.facades.LineageFacadeImpl.getLineageGraph (LineageFacadeImpl.java:245)

    ... 21 more

    Caused by: java.sql.SQLException: ORA-22813: value of the operand exceeds the limits of the system

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)

    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)

    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)

    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)

    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1188)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)

    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3487)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)

    at MITI.util.database.Query.executeStatement (Query.java:45)

    at MITI.util.database.Statement.execute (Statement.java:66)

    to MITI.util.database.CommonDataSource$ 1.run(CommonDataSource.java:50)

    to MITI.util.database.CommonDataSource$ 1.run(CommonDataSource.java:47)

    at MITI.util.database.Transaction.execute (Transaction.java:92)

    at MITI.util.database.CommonDataSource.executeTransaction (CommonDataSource.java:80)

    ... more than 27

    Caused by:

    MITI.server.services.lineage.LineageException: (LNGTRC_E0016) SQL error during the tracing of lineage: ORA-22813: value of the operand exceeds the limits of the system

    at MITI.server.services.lineage.database.LineageDataSource.handle (LineageDataSource.java:41)

    at MITI.util.database.CommonDataSource.handleSQLException (CommonDataSource.java:124)

    at MITI.util.database.CommonDataSource.executeTransaction (CommonDataSource.java:83)

    at MITI.util.database.CommonDataSource.executeStatement (CommonDataSource.java:54)

    at MITI.server.services.lineage.impl.LineageImpl.traceLineage (LineageImpl.java:554)

    at MITI.server.services.lineage.common.LineageTracer.traceLineage (LineageTracer.java:1078)

    at MITI.server.services.lineage.common.LineageTracer.traceDataLineage (LineageTracer.java:313)

    at MITI.server.services.lineage.common.LineageTracer.traceTechnicalData (LineageTracer.java:176)

    at MITI.web.common.service.facades.LineageFacadeImpl.getLineageGraph (LineageFacadeImpl.java:245)

    at MITI.flash.tabs.VizModelLineage.getLineageTree (VizModelLineage.java:429)

    at MITI.flash.tabs.VizModelLineage.buildLineageGraph (VizModelLineage.java:356)

    at MITI.flash.tabs.VizModelLineage.performAction (VizModelLineage.java:148)

    at MITI.server.servlets.FlashServlet.doPost (FlashServlet.java:156)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)

    to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.java:611)

    to org.apache.tomcat.util.net.JIoEndpoint$ SocketProcessor.run (JIoEndpoint.java:316)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:895)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:918)

    to org.apache.tomcat.util.threads.TaskThread$ WrappingRunnable.run (TaskThread.java:61)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: java.sql.SQLException: ORA-22813: value of the operand exceeds the limits of the system

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)

    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)

    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)

    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)

    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1188)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)

    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3487)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)

    at MITI.util.database.Query.executeStatement (Query.java:45)

    at MITI.util.database.Statement.execute (Statement.java:66)

    to MITI.util.database.CommonDataSource$ 1.run(CommonDataSource.java:50)

    to MITI.util.database.CommonDataSource$ 1.run(CommonDataSource.java:47)

    at MITI.util.database.Transaction.execute (Transaction.java:92)

    at MITI.util.database.CommonDataSource.executeTransaction (CommonDataSource.java:80)

    ... more than 27

    Caused by:

    java.sql.SQLException: ORA-22813: value of the operand exceeds the limits of the system

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)

    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)

    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)

    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)

    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1188)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)

    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3487)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)

    at MITI.util.database.Query.executeStatement (Query.java:45)

    at MITI.util.database.Statement.execute (Statement.java:66)

    to MITI.util.database.CommonDataSource$ 1.run(CommonDataSource.java:50)

    to MITI.util.database.CommonDataSource$ 1.run(CommonDataSource.java:47)

    at MITI.util.database.Transaction.execute (Transaction.java:92)

    at MITI.util.database.CommonDataSource.executeTransaction (CommonDataSource.java:80)

    at MITI.util.database.CommonDataSource.executeStatement (CommonDataSource.java:54)

    at MITI.server.services.lineage.impl.LineageImpl.traceLineage (LineageImpl.java:554)

    at MITI.server.services.lineage.common.LineageTracer.traceLineage (LineageTracer.java:1078)

    at MITI.server.services.lineage.common.LineageTracer.traceDataLineage (LineageTracer.java:313)

    at MITI.server.services.lineage.common.LineageTracer.traceTechnicalData (LineageTracer.java:176)

    at MITI.web.common.service.facades.LineageFacadeImpl.getLineageGraph (LineageFacadeImpl.java:245)

    at MITI.flash.tabs.VizModelLineage.getLineageTree (VizModelLineage.java:429)

    at MITI.flash.tabs.VizModelLineage.buildLineageGraph (VizModelLineage.java:356)

    at MITI.flash.tabs.VizModelLineage.performAction (VizModelLineage.java:148)

    at MITI.server.servlets.FlashServlet.doPost (FlashServlet.java:156)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

    Oracle has published OEMM 12.2.1 and this error is gone! So if you are facing this problem in an older version, just go to the newest one.

Maybe you are looking for