oracle10g

XMLType pl/sql update child

强颜欢笑 提交于 2020-01-06 09:33:43
问题 i have XML structure like below in XMLType column (Oracle 10g) <DATA> <CHILDRENS> <CHILDRENS_DEF lname="smith"> <CHILD_KOL no="1" name="Id" desc="Id" typ="NUMBER"/> <CHILD_KOL no="2" name="Fname" desc="Fname" typ="VARCHAR2"/> </CHILDRENS_DEF> <CHILDRENS_DATA> <CHILD_DATA no="1"> <CHILD_COL_VALUE no="1" name="Id">1</CHILD_COL_VALUE> <CHILD_COL_VALUE no="2" name="Fname">Christopher</CHILD_COL_VALUE> </CHILD_DATA> <CHILD_DATA no="2"> <CHILD_COL_VALUE no="1" name="Id">1</CHILD_COL_VALUE> <CHILD

XMLType pl/sql update child

廉价感情. 提交于 2020-01-06 09:32:29
问题 i have XML structure like below in XMLType column (Oracle 10g) <DATA> <CHILDRENS> <CHILDRENS_DEF lname="smith"> <CHILD_KOL no="1" name="Id" desc="Id" typ="NUMBER"/> <CHILD_KOL no="2" name="Fname" desc="Fname" typ="VARCHAR2"/> </CHILDRENS_DEF> <CHILDRENS_DATA> <CHILD_DATA no="1"> <CHILD_COL_VALUE no="1" name="Id">1</CHILD_COL_VALUE> <CHILD_COL_VALUE no="2" name="Fname">Christopher</CHILD_COL_VALUE> </CHILD_DATA> <CHILD_DATA no="2"> <CHILD_COL_VALUE no="1" name="Id">1</CHILD_COL_VALUE> <CHILD

Dynamic column name to record type variable

会有一股神秘感。 提交于 2020-01-06 08:33:18
问题 DECLARE TYPE t IS RECORD ( col_name VARCHAR2 (100) ); t_row t; cname VARCHAR (100) := 'col_name'; BEGIN t_row.col_name := 'col'; DBMS_OUTPUT.put_line ('out'); IF t_row.cname IS NULL THEN DBMS_OUTPUT.put_line ('in'); END IF; END; Error at line 1 ORA-06550: line 12, column 12: PLS-00302: component 'CNAME' must be declared ORA-06550: line 12, column 3: PL/SQL: Statement ignored How can I assign dynamic column name to type variable of record? 回答1: You can do that with dynamic sql: To make the

Create trigger for auto incerment id and default unix datetime

爱⌒轻易说出口 提交于 2020-01-06 08:18:27
问题 Any one help me to create a trigger for auto increment fld_id and Unix datetime. My table field is fld_id(int),fld_date(number),fld_value(varchar2). My insert query is insert into table (fld_value)values('xxx'); insert into table (fld_value)values('yyy'); I need the table record like this fld_id fld_date fld_value 1 1354357476 xxx 2 1354357478 yyy Please help me to create this.I can't able to do this.. 回答1: If you want fld_id to be a sequential value, you'll need to create a sequence and a

Query Returning value as 0

怎甘沉沦 提交于 2020-01-06 08:00:54
问题 I am trying to execute following PL/SQL script in SQL Developer. The loop should return count of nulls but somehow everytime it is returning 0. set serveroutput on DECLARE --v_count number; v_count_null number; BEGIN execute immediate 'select count(*) from SP_MOSAIX' into v_count; FOR i in (select column_name from all_tab_COLUMNS where table_name = 'SP_MOSAIX') LOOP select count(*) into v_count_null from SP_MOSAIX where i.column_name IS NULL ; dbms_output.put_line(v_count_null); END LOOP; END

Error when multiple users access my web app at the same time

空扰寡人 提交于 2020-01-06 07:11:49
问题 I'm using .Net 2008 and Oracle 10g as my database. The problem I'm getting is after deploying the application in IIS, when multiple users access the same page at a time i'm getting the error. Can't get the output. Note: Both the users accessing the same page, same menu at a time. How can I resolve this? 回答1: My guess would be a standard thread-safety / synchronization bug, most likely due to some static resource such as a static connection. Obviously this is pure speculation without some more

Error when multiple users access my web app at the same time

自作多情 提交于 2020-01-06 07:11:11
问题 I'm using .Net 2008 and Oracle 10g as my database. The problem I'm getting is after deploying the application in IIS, when multiple users access the same page at a time i'm getting the error. Can't get the output. Note: Both the users accessing the same page, same menu at a time. How can I resolve this? 回答1: My guess would be a standard thread-safety / synchronization bug, most likely due to some static resource such as a static connection. Obviously this is pure speculation without some more

Triggers: how can I initialize the value on a table with a value on another?

人走茶凉 提交于 2020-01-05 17:30:07
问题 I'm creating a trigger to initialize the value plazas_disponibles on table VUELO with the value capacidad on table MODELO. Like this: create or replace TRIGGER inicializar_plazas_disponibles BEFORE INSERT OR UPDATE ON VUELO BEGIN SET VUELO (plazas_disponibles) = MODELO (capacidad); END inicializar_plazas_disponibles; And I'm getting the following errors: Error(2,10): PL/SQL: SQL Statement ignored Error(2,14): PL/SQL: ORA-00922: missing or invalid option Error(2,23): PL/SQL: ORA-00971: missing

pdo_oci_handle_factory: Error while trying to retrieve text for error ORA-01804

不羁的心 提交于 2020-01-05 07:41:15
问题 I'm using Laravel 5.5, php 7.1.9, and oracle 10g i don't know if i'm connected to the database or not and if yes, is the problem in my code ? PDOException SQLSTATE[HY000]: pdo_oci_handle_factory: Error while trying to retrieve text for error ORA-01804 (ext\pdo_oci\oci_driver.c:640) oracledb.php return [ 'oracle' => [ 'driver' => 'pdo', 'tns' => env('DB_TNS', 'XE'), 'host' => env('DB_HOST', 'GREEN-PC'), 'port' => env('DB_PORT', '1521'), 'database' => env('DB_DATABASE', 'XE'), 'username' => env

Search the value from one column in another column in a different table

。_饼干妹妹 提交于 2020-01-05 06:56:30
问题 I need to search the column value from one table with column value of another table. For example MyTable Col1 Col2 AAA 1 BBB 2 CCC 3 MyTable2 Col1 Col2 GHKGH AAAh 1 dhsjsBvd 2 bdnd CCC b 3 I need to search the col1 value from MyTable in col1 value of MyTable2. I dont want to hard code the string but take the value from table. Tried using instr and regex_instr , but these functions don't allow column values in the pattern to search. I am using oracle 10g. TIA 回答1: Tested example here: http:/