oracle9i

Oracle syntax error [duplicate]

爱⌒轻易说出口 提交于 2019-12-01 15:33:14
问题 This question already has answers here : How do I limit the number of rows returned by an Oracle query after ordering? (16 answers) Closed 3 months ago . I got the following error in Oracle: SELECT * FROM abcd WHERE name LIKE 'a%' LIMIT 10 * ERROR at line 1: ORA-00933: SQL command not properly ended What is the problem with the command? 回答1: Oracle doesn't support the limit clause. That's a MySQL/Postgres thing. There are alternatives, although they're often a lot more involved http://www

Oracle ODBC : Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

南楼画角 提交于 2019-12-01 13:16:26
I have message Oracle ODBC : Driver's SQLAllocHandle on SQL_HANDLE_ENV failed when try to open oracle connection in excel. I'm working in virtual machine via citrix. Could you please give tips why it is appear and how avoid problem ? The problem appears to be a permission issue during the installation of both Oracle 9i and 10G. If you navigate Oracle home you will find that the directory has different permissions then the root of the tree. In the case of 10G the path is C:Oracleproduct10.1.0Client_1. Open the properties for the Client_X directory, and you will see that "Authenticated Users"

How can you tell which columns are unused in ALL_TAB_COLS?

守給你的承諾、 提交于 2019-12-01 08:45:16
When you query the ALL_TAB_COLS view on Oracle 9i, it lists columns marked as UNUSED as well as the 'active' table columns. There doesn't seem to be a field that explicitly says whether a column is UNUSED, or any view I can join to that lists the unused columns in a table. How can I easily find out which are the unused columns, so I can filter them out of ALL_TAB_COLS? Try using ALL_TAB_COLUMNS instead of ALL_TAB_COLS. In Oracle 11.2 I find that unused columns appear in ALL_TAB_COLS (though renamed) but not in ALL_TAB_COLUMNS. I created a table like this: create table t1 (c1 varchar2(30), c2

How can you tell which columns are unused in ALL_TAB_COLS?

别来无恙 提交于 2019-12-01 06:44:39
问题 When you query the ALL_TAB_COLS view on Oracle 9i, it lists columns marked as UNUSED as well as the 'active' table columns. There doesn't seem to be a field that explicitly says whether a column is UNUSED, or any view I can join to that lists the unused columns in a table. How can I easily find out which are the unused columns, so I can filter them out of ALL_TAB_COLS? 回答1: Try using ALL_TAB_COLUMNS instead of ALL_TAB_COLS. In Oracle 11.2 I find that unused columns appear in ALL_TAB_COLS

mutating, trigger/function may not see it- error during execution of trigger

不想你离开。 提交于 2019-12-01 00:03:47
CREATE OR REPLACE TRIGGER UPDATE_TEST_280510 AFTER insert on TEST_TRNCOMPVISIT declare V_TRNCOMPNO NUMBER(10); CURSOR C1 IS SELECT B.COMPNO FROM TEST_TRNCOMPVISIT A, TEST_TRNCOMPMST B, TEST_MEMMAST C WHERE A.COMPNO=B.COMPNO AND B.TRNMEMID=C.MEMID AND C.MEMOS>=1000; begin open c1; fetch c1 into V_TRNCOMPNO; UPDATE TEST_TRNCOMPMST SET COMPSTATUS='P', remark='comp is pending due to O/S>1000' WHERE COMPNO=V_TRNCOMPNO AND COMPSTATUS='C'; CLOSE C1; end; I have made this trigger and while insert the row in table- TEST_TRNCOMPVISIT it gives following error- The following error has occurred: ORA-04091:

Oracle10G导入到oracle9i

你。 提交于 2019-11-30 16:06:24
1. 用 oracle9i 客户端去连接 oracle10G 数据库(修改 C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN 下的 tnsnames.ora 文件); 2. 将要导出的表导成 .pde 格式; 3. 在将 .pde 格式导入到 oracle9i 中。 来源: oschina 链接: https://my.oschina.net/u/122166/blog/29855

How to select only 1 row from oracle sql?

廉价感情. 提交于 2019-11-29 19:29:49
I want to use oracle syntax to select only 1 row from table DUAL . For example, I want to execute this query: SELECT user FROM DUAL ...and it'd have, like, 40 records. But I need only one record. ...AND, I want to make it happen without a WHERE clause. I need something in the table_name field such as: SELECT FirstRow(user) FROM DUAL mindvirus You use ROWNUM. ie. SELECT user FROM Dual WHERE ROWNUM = 1 http://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns009.htm I found this "solution" hidden in one of the comments. Since I was looking it up for a while, I'd like to highlight it a

the best way to track data changes in oracle

≯℡__Kan透↙ 提交于 2019-11-29 14:08:28
as the title i am talking about, what's the best way to track data changes in oracle? i just want to know which row being updated/deleted/inserted? at first i think about the trigger, but i need to write more triggers on each table and then record down the rowid which effected into my change table, it's not good, then i search in Google, learn new concepts about materialized view log and change data capture, materialized view log is good for me that i can compare it to original table then i can get the different records, even the different of the fields, i think the way is the same with i

SQLPLUS command line with Windows batch file

只愿长相守 提交于 2019-11-29 10:43:25
I want to create a batch file which will open the SQLPLUS [CLI] and will execute some stored sql file and will also store the output to text file. So I've created this batch file [which does not work]. These SQL file contains SQL which returns the max number from a table. sqlplus scott/tiger@DB @sql1.sql>data1.txt @sql2.sql>data2.txt The problem is it does not executes the SQL files after opening the SQLPLUS Windows XP Oracle 9i What about native Sql*plus spooling? run.bat: sqlplus hr/hr@sandbox @d:\run.sql run.sql: spool d:\run.log set echo on select * from dual / exit run.log: 01:50:20 HR

Oracle SQL Developer: How to transpose rows to columns using PIVOT function

拟墨画扇 提交于 2019-11-29 07:14:33
I'm attempting to create a query to transpose rows into columns using the PIVOT function. This is the contact table I want to transpose into rows: PARTYID CONTACTTEXT CONTACTTYPECD ---------- ------------ ------------- 100 0354441010 1 100 0355551010 2 100 0428105789 3 100 abc@home.com 4 My intended result: PARTYID PHONE FAX MOBILE EMAIL ---------- ------------ ------------ ------------ ------------ 100 0354441010 0355551010 0428105789 abc@home.com My query: SELECT * FROM ( SELECT partyId, contacttext, contacttypecd FROM CONTACT WHERE partyId = 100; ) PIVOT ( MAX(contacttext) FOR contacttypecd