oracle9i

Updating board in oracle form

偶尔善良 提交于 2020-02-06 09:13:04
问题 Is there anything like thread in Oracle forms for updating one part? I want to create a message box and update that part with the new events, so I need to have something like thread or Timer in my oracle form. Any examples or ideas? I am working with Oracle forms 6i, but I can convert to 10g also. My oracle server version is 9. 回答1: The help file/ online documentation in Oracle Forms features sample code on creating timers. Create a timer, perhaps under WHEN-NEW-FORM-INSTANCE trigger DECLARE

Oracle9i JPA Hibernate NamedStoredProcedureQuery : String attributes of my object class are not matched even column names explitictly specificed

会有一股神秘感。 提交于 2020-01-25 06:57:08
问题 As a system analyst, I develop a class object mapping the columns of tables , so that I can call stored procedures to return a list of class objects as json array. Throughout examining the SQL structure of the table, there is a composite key made of LOOKUP_CODE and LOOKUP_TYPE. The sql database is Oracle 9i Result : Some fields are missing to be returned Would you please devise the strategies to match the columns under this case? Here is my table columns : Here is the SQL: CREATE TABLE "PC

Greatest not null column

喜你入骨 提交于 2020-01-22 17:39:06
问题 I need to update a row with a formula based on the largest value of two DATETIME columns. I would normally do this: GREATEST(date_one, date_two) However, both columns are allowed to be NULL. I need the greatest date even when the other is NULL (of course, I expect NULL when both are NULL) and GREATEST() returns NULL when one of the columns is NULL. This seems to work: GREATEST(COALESCE(date_one, date_two), COALESCE(date_two, date_one)) But I wonder... am I missing a more straightforward

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

oversubscribed literal/length tree error while creating database

会有一股神秘感。 提交于 2020-01-06 05:47:11
问题 While running database configuration assistant(oracle 9i) I get error oversubscribed literal/length tree .Please help me out. 回答1: This is an instance of java.util.zip.ZipException . There are a number of things which might cause it. One cause is the executed path being too long, for instance if you extracted the zip to a sub-directory (instead of, say, the root). But there are a number of other things which might cause it, e.g. file corruption. So if the directory path length is not the

PL/SQl, oracle 9i, deleting duplicate rows using sql

一笑奈何 提交于 2020-01-05 05:24:08
问题 we have a scenario here where we need to delete all the duplicate rows from a table based on timestamp. The table structure looks like this: Item Ref1 Ref2 Timestamp 1 A test1 2/3/2012 10:00:00 1 A test2 2/3/2012 11:00:00 1 A test1 2/3/2012 12:00:00 2 A prod1 2/3/2012 10:00:00 2 B prod2 2/3/2012 11:00:00 2 A prod2 2/3/2012 12:00:00 So we need to delete the duplicate rows from this table based on item and ref1. like here we should have only 1 row for item 1 and ref1 A with the latest timestamp

How can I know which values are numeric in oracle 9i

旧时模样 提交于 2020-01-04 03:59:07
问题 I have this database which contains a varchar. I want to know which records holds numeric values. I tried REGEXP_COUNT and other but I'm running on 9i and I think this is for 10g > How can I achieve this? I tried: select to_number( my_column ) from my_table But it doesn't work, because well not all of them are numeric. EDIT Background. This table contains employee id's, all of which are numeric ( read 1234 or 24523 or 6655 ) The in the initial database load, when the employee id was unknown

pl/sql function called how many times?

馋奶兔 提交于 2020-01-03 08:43:19
问题 Assume you have the following update: Update table set col1 = func(col2) where col1<>func(col2) The func function is evaluated two times for every row, or once for every row? Thanks, 回答1: This is the kind of situation where some experimentation is useful (this was conducted on 10g). Using the following query, we can tell that normal functions, using the same parameters (in this case, none) will be executed each time they are called: select dbms_random.value() from all_tables This is because

pl/sql function called how many times?

核能气质少年 提交于 2020-01-03 08:43:11
问题 Assume you have the following update: Update table set col1 = func(col2) where col1<>func(col2) The func function is evaluated two times for every row, or once for every row? Thanks, 回答1: This is the kind of situation where some experimentation is useful (this was conducted on 10g). Using the following query, we can tell that normal functions, using the same parameters (in this case, none) will be executed each time they are called: select dbms_random.value() from all_tables This is because

Single SQL SELECT Returning multiple rows from one table row

左心房为你撑大大i 提交于 2020-01-02 04:01:12
问题 We have a table which is of the form: ID,Value1,Value2,Value3 1,2,3,4 We need to transform this into. ID,Name,Value 1,'Value1',2 1,'Value2',3 1,'Value3',4 Is there a clever way of doing this in one SELECT statement (i.e without UNIONs)? The column names Value1,Value2 and Value3 are fixed and constant. The database is oracle 9i. 回答1: This works on Oracle 10g: select id, 'Value' || n as name, case n when 1 then value1 when 2 then value2 when 3 then value3 end as value from (select rownum n from