oracle10g

invalid path while trying to write the file in pl sql

怎甘沉沦 提交于 2020-01-24 19:54:01
问题 i am trying to write to a text file in oracle pl sql(10 g). i have created the directory it is existing but still getting invalid path. below is the code. CREATE DIRECTORY test_dir AS 'c:\'; -- CREATE DIRECTORY test_dir AS '/tmp'; DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN fileHandler := UTL_FILE.FOPEN('test_dir', 'test_file.txt', 'W'); UTL_FILE.PUTF(fileHandler, 'Writing TO a file\n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-20000,

oracle sql listagg [duplicate]

寵の児 提交于 2020-01-24 13:02:11
问题 This question already has an answer here : Not able to use LISTAGG (1 answer) Closed 2 years ago . SELECT deptno, LISTAGG(ename, ',') WITHIN GROUP (ORDER BY ename) AS employees FROM emp GROUP BY deptno; Error:- ORA-00923: FROM keyword not found where expected 00923. 00000 - "FROM keyword not found where expected" *Cause: *Action: Error at Line: 1 Column: 42 Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production 回答1: For the 10gR2 or 11gR1 versions of Oracle , you can use

Oracle 10g: MIN/MAX column value estimation

南楼画角 提交于 2020-01-23 18:25:27
问题 is it possible to retrieve statistics about the minimal or maximal value of a numeric column in Oracle 10g? I have found the table USER_TAB_COL_STATISTICS having a LOW_VALUE and HIGH_VALUE column, but I am not sure whether those are the values I am looking for. I need to find an efficient way to ask the DBS for those statistics. Using a regular MIN(a) and MAX(a) query would be too slow on large tables. Thanks in advance. 回答1: Yes, LOW_VALUE and HIGH_VALUE will tell you the minimum and maximum

Does Tomcat use cached versions of pl/sql modules?

丶灬走出姿态 提交于 2020-01-23 10:47:26
问题 Ok imagine this situation. I make a change to a pl/sql module, recompile it and everything is fine. No errors. I then try to access a GUI screen on an application that runs on Tomcat. The screen calls a pl/sql module in an oracle database. When i submit the form which should have called that pl/sql module for processing the data, i get this error ORA-20001: ORA-06508: PL/SQL: could not find program unit being called I checked all packages in $USER_OBJECTS and there is nothing with a status of

Split random data in a column with semi colon delimiter into few columns in oracle

試著忘記壹切 提交于 2020-01-17 06:43:05
问题 Can you help me to solve this with simple query in oracle 10g? I have referenced this question from : SQL - Divide single column in multiple columns But, how if the amount of commas are not defined? Example (edited) 1st Row: Black, Blue, White 2nd Row: Blue, White 3rd Row: Blue, White, Black, Brown 来源: https://stackoverflow.com/questions/44511693/split-random-data-in-a-column-with-semi-colon-delimiter-into-few-columns-in-orac

Trigger with Merge statement in oracle

懵懂的女人 提交于 2020-01-17 06:33:00
问题 What is wrong with below code, can some help me to resolve it? CREATE OR REPLACE TRIGGER TEST_TRI AFTER INSERT ON TEST1 FOR EACH ROW WHEN (NEW.COL2 >= '01-MAY-16') BEGIN IF INSERTING THEN MERGE INTO TEST_HIST HIST USING TEST1 T1 ON (T1.NEW.COL1=HIST.COL2) WHEN MATCHED THEN UPDATE SET HIST.COL5=NEW.COL5 WHEN NOT MATCHED THEN INSERT INTO VALUES (:NEW.COL1,:NEW.COL2,:NEW.COL3,:NEW.COL4,:NEW.COL5); END IF; END; / Error: Error(4,3):PL/SQL : Sql stmt ignored Error (12,14) : PL/SQL : ORA-00926:

check connection from C# app to oracle 10g database

空扰寡人 提交于 2020-01-17 02:40:07
问题 How can I check connection from C# app to oracle 10g database? For example I have Oracle server on machine with IP 10.50.65.2. I maintain IP, Port in app.config. I move app to another pc connected to another network. I need check if it is possible create correct connection with database server. If it is not possible create db connection I need show only simple message please modify db connection data in app.config. 回答1: Why don't you just try to create the connection and catch the exception

ORA-12154 error [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-16 19:57:12
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . While I tried to create data connection for using oracle 10g for asp.net form, i got the error ORA-12154 error . Can any one sort this out for me? Since Im new to oracle , it looks hard for me. but the connection

How To Insert USERID (Type: Raw, Size: 16) from Ora_aspnet_users to Another Table

好久不见. 提交于 2020-01-16 19:15:32
问题 Sorry I cannot upload the screenshot due to the limited number of my reputation since I am a newbie here. ora_aspnet_user table with column name userid with datatype of Raw(16) link to Instruct Table with userid with datatype of Raw (16) - Other columns is ID (Auto Trigger No), Command (Varchar2 = 256) MY INLINE ASPX CODE: <form id="form1" runat="server"> <div> <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource1" DefaultMode="Insert" Height=

What is the limit for varchar2 in a Table of Type in Oracle?

耗尽温柔 提交于 2020-01-16 18:54:27
问题 I am looking for the limit of the varchar2 type as far as a Table of type is concerned in oracle. Note that I am not talking about a physical table (for which the limit for varchar2 is 4000) but the table of a type. Thanks 回答1: It depends on the context. A table of VARCHAR2(32767) can be created anywhere. But 32767 can only be used in PL/SQL. The limit in SQL is still 4000. SQL> --#1: SQL, 4000. SQL> create or replace type varchar2_limit is table of varchar2(4000); 2 / Type created. SQL>