oracle18c

Select parent rows and include cost of children

扶醉桌前 提交于 2020-12-15 05:43:05
问题 I have a WORKORDER table that has parent and child WOs in it: with workorder as ( select 'WO37342' as wonum, null as parent, 297.36 as actlabcost, 200 as actmatcost, 0 as actservcost, 0 as acttoolcost from dual union all select 'WO37427' as wonum, 'WO37342' as parent, 99.12 as actlabcost, 0 as actmatcost, 0 as actservcost, 0 as acttoolcost from dual union all select 'WO37429' as wonum, 'WO37342' as parent, 99.12 as actlabcost, 100 as actmatcost, 0 as actservcost, 0 as acttoolcost from dual )

OracleCommandBuilder.DeriveParameters() throws OracleException: ORA-06564: object does not exist ORA-06512: at “SYS.DBMS_UTILITY”

守給你的承諾、 提交于 2020-07-10 06:53:11
问题 Using the OracleClient that comes with ADO.NET in .NET Framework, I'm trying to call OracleCommandBuilder.DeriveParameters() method on a procedure in the database, but I keep getting an OracleException with the message: ORA-06564: object CustOrdersOrders does not exist , even though I created the procedure successfully. I'm more familiar with SQL Server, so perhaps I'm missing something here. SQL file 1.sql: create or replace PACKAGE PKGENTLIB_ARCHITECTURE IS TYPE CURENTLIB_ARCHITECTURE IS

Getting “Unable to check for available memory.” on Oracle DB 18c

大兔子大兔子 提交于 2020-07-08 12:46:57
问题 I am trying to create a database in order to complete my self learning, but unfortunately I got unexpected error "Unable to check for available memory.", I am doing it using Database Configuration Assistant (DBCA). I really need to solve this so I can continue my self learning, Any help will be extremely appreciated. Thanks, My Oracle Database Version 回答1: Add the following parameter to bypass the error: dbca -J-Doracle.assistants.dbca.validate.ConfigurationParams=false & 回答2: This error as

SQL Developer doesn't display XML

北战南征 提交于 2020-06-14 08:36:01
问题 Oracle's SQL Developer doesn't display the content of XML columns when the datatype XMLType is used. The first lines are displayed ok (if Preferences > Database > Advanced > Display XML Value in Grid is ticked), but once you doubleclick on the little yellow pencil, the "View Value" window remains empty. Curiously, it works if you store the XML in a clob. CREATE TABLE t (x XMLTYPE, c CLOB); INSERT INTO t VALUES (XMLTYPE('<x/>'), '<x/>'); COMMIT; SELECT * FROM t; After a lot of internet search,

SQL Developer doesn't display XML

社会主义新天地 提交于 2020-06-14 08:35:51
问题 Oracle's SQL Developer doesn't display the content of XML columns when the datatype XMLType is used. The first lines are displayed ok (if Preferences > Database > Advanced > Display XML Value in Grid is ticked), but once you doubleclick on the little yellow pencil, the "View Value" window remains empty. Curiously, it works if you store the XML in a clob. CREATE TABLE t (x XMLTYPE, c CLOB); INSERT INTO t VALUES (XMLTYPE('<x/>'), '<x/>'); COMMIT; SELECT * FROM t; After a lot of internet search,

How to insert 1 million rows into Oracle database with Python?

老子叫甜甜 提交于 2020-05-14 01:27:54
问题 I have ~100,000 to 1,000,000 rows to insert into an Oracle18c database. I'm quite new with Oracle and this order of magnitude of data. I reckon there must be some optimal way to do it, but for now I've only managed to implement a line by line insertion: def insertLines(connection, tableName, column_names, rows): cursor = connection.cursor() if tableExists(connection, tableName): for row in rows: sql = 'INSERT INTO {} ({}) VALUES ({})'.format(tableName, column_names, row) cursor.execute(sql)

How to insert 1 million rows into Oracle database with Python?

自古美人都是妖i 提交于 2020-05-14 01:26:35
问题 I have ~100,000 to 1,000,000 rows to insert into an Oracle18c database. I'm quite new with Oracle and this order of magnitude of data. I reckon there must be some optimal way to do it, but for now I've only managed to implement a line by line insertion: def insertLines(connection, tableName, column_names, rows): cursor = connection.cursor() if tableExists(connection, tableName): for row in rows: sql = 'INSERT INTO {} ({}) VALUES ({})'.format(tableName, column_names, row) cursor.execute(sql)

How to parse json efficiently in Oracle 18c?

妖精的绣舞 提交于 2020-01-06 06:55:53
问题 I am trying to parse a large json using JSON_OBJECT_T , JSON_ARRAY_T APIs and its working fine but I want expert suggestions whether it is efficient or not? I am adding my json file and parsing code as below SampleJson Code SET SERVEROUTPUT ON; DECLARE l_clob clob; l_time timestamp; l_json json_object_t; l_stops_array json_array_t; l_stops_arr json_array_t; routeInfoObj json_object_t; routeStopArr json_array_t; BEGIN SELECT LOG_CLOB INTO l_clob FROM ITV_DEV_LOGS WHERE LOG_ID = 1435334; l_time