oracle11g

SQL query to resolve transitive dependencies in database

ぃ、小莉子 提交于 2019-12-06 04:10:13
问题 SQLFIddle link for this data. Suppose I have a table with following Structure: create table rd(r1 number,r2 number, primary key (r1,r2)); Sample Data: | R1 | R2 | ----------- | 1 | 2 | | 1 | 4 | | 2 | 3 | | 3 | 1 | | 4 | 5 | What it means is that R1 is related to R2 , bi-directionally. So if there is an entry in database for 1,3 there won't be an entry like 3,1. According to above data: 1 is related to 2,4,3 directly. And 4 is related to 1 also . So via transitive dependency, 1 and 5 are also

Change NLS Character set parameters on Oracle 11g XE

倾然丶 夕夏残阳落幕 提交于 2019-12-06 04:09:28
问题 I am using Oracle 11g Express Edition. Currently when I check NLS character set parameter using SELECT * FROM nls_database_parameters; it gives the default values: NLS_CHARACTERSET: AL32UTF8 NLS_NCHAR_CHARACTERSET: AL16UTF16 I want to set both these parameters to UTF8. How can I do so? I have just installed Oracle 11g XE, so there is not data except those required by Oracle itself. 回答1: This worked for me where an application was checking for UTF8 rather than AL32UTF8 . SQL> shutdown

ClassCastException in JPA Entitiy after redeploy (Glassfish 3.1.2)

拜拜、爱过 提交于 2019-12-06 03:52:31
问题 I have a strange effect when undeploying and deploying a WebArchive (.war) with Glassfish 3.1.2. $ asadmin undeploy myWebApp; asadmin deploy target/myWebApp.war It deploys normally, but when I fetch an entity bean via the entity manager, it throws an Exception: [#|2012-12-11T15:26:09.772+0100|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=119;_ThreadName=Thread-2;|java.lang.ClassCastException: org.YourEntity cannot be cast to org.YourEntity The

How to use UTL_COMPRESS package to compress the txt file and create gz file in unix with oracle 11 g?

半城伤御伤魂 提交于 2019-12-06 03:48:20
问题 I have following requirement : Actually I have txt file I need to compress this file and create gz file using oracle UTL_COMPRESS package. I need to implement this functionality on Unix box with Oracle 11g. I have tried it with below code and it is working for some extent.I mean it is working to compress the small size file. DECLARE f utl_file.file_type; compressed BLOB; data_b BFILE; BEGIN f := UTL_FILE.fopen ('DIR_UTL_COM_TEST', 'Test1.gz', 'wb'); data_b := BFILENAME ('DIR_UTL_COM_TEST','pk

Recursive Insert using connect by clause

妖精的绣舞 提交于 2019-12-06 03:19:39
问题 I have hierarchical data (right) in table in following manner which creates Hierarchy as shown in left. Tables are kept in oracle 11g. TREE Hierarchy Tree Table -------------- Element Parent ------ ------ P0 P0 P1 P1 P0 P11 P2 P0 C111 P11 P1 C112 P12 P1 P12 P21 P2 C121 P22 P2 C122 C111 P11 P2 C112 P11 P21 C121 P12 C211 C122 P12 C212 C211 P21 P22 C212 P21 C221 C221 P22 C222 C222 P22 My data table has values as follows. It contains values for all leaf nodes. Data Table Element Value C111 3 C112

Using SQL LOADER in Oracle to import CSV file

两盒软妹~` 提交于 2019-12-06 03:11:10
问题 I'm pretty new to databases and programming. I'm not very good with the computer lingo so stick with me. I have a csv file that I'm trying to load into my Oracle database. It contains account information such as name, telephone number, service dates etc. I've installed Oracle 11g Release 2 . This is what I've done so far step by step.. 1) Ran SQL Loader I created a new table with the columns that I needed. For example create table Billing ( TAP_ID char(10), ACCT_NUM char(10), MR_ID char(10),

Search for similar words using an index

廉价感情. 提交于 2019-12-06 02:55:16
I need to search over a DB table using some kind of fuzzy search like the one from oracle and using indexes since I do not want a table scan(there is a lot of data). I want to ignore case, language special stuff(ñ, ß, ...) and special characters like _, (), -, etc... Search for "maria (cool)" should get "maria- COOL" and "María_Cool" as matches. Is that possible in Oracle in some way? About the case, I think it can be solved created the index directly in lower case and searching always lower-cased. But I do not know how to solve the special chars stuff. I thought about storing the data without

I want Search specific value in all columns of all tables in oracle 11g

…衆ロ難τιáo~ 提交于 2019-12-06 02:07:55
问题 Is it possible to search every field of every table for a particular value in Oracle. I want to do it without using any procedure.. Can we do it with query? 回答1: You can do it with a single query though it's a bit convoluted. This query will search all CHAR and VARCHAR2 columns in the current schema for the string 'JONES' select table_name, column_name from( select table_name, column_name, to_number( extractvalue( xmltype( dbms_xmlgen.getxml( 'select count(*) c from ' || table_name || ' where

wrong number or types of arguments in call to my procedure

不羁岁月 提交于 2019-12-06 01:36:37
hi I wrote this code to create a procedure to return a Boolean value based on the if conditions but when I execute it I got this error: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'DDPAY_SP' ORA-06550: line 1, column 7: PL/SQL: Statement ignored 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action: here is my procedure create or replace procedure DDPAY_SP ( donor_id dd_donor.iddonor%type, pldgstatus out dd_pledge.idstatus%type, monthplan out dd_pledge.paymonths%type, ret out boolean) IS begin select idstatus,

Grails - Multiple Datasources

99封情书 提交于 2019-12-05 23:59:11
问题 First, let me start that I have looked so many sites about the "correct" way to configure multiple datasource on Grails, every one of them (with Grails 2.0 and later) pointing to the docs , however after doing what the docs says I get this error: Error 2014-03-29 15:48:29,219 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Error creating bean with name 'transactionManager_lookup': Cannot resolve reference to bean 'sessionFactory_lookup' while