I have a situation where I have 2 tables in which I can do Insert,Update,Delete.I'm introducing a table audit_trail to maintain a log of changes of this two tables.Now to enter values in audit_trail table I have written insert statements after any Update,Delete or Insert on either of the table.Now if an modification happened on one of th...
I was looking at a very slow SQL query (originating from a Java app using Hibernate deployed in JBoss 5.1). This particular query returned about 10K records but still took 40s or more.
I ended up sniffing the traffic with the database (wireshark has a dissector for TNS) and found something unexpected. When data was coming from the serve...
Hi guys,
I have two different queries which produce the same results. I wonder which one is more efficent. The second one, I am using one select clause less, but I am moving the where to the outter select. Which one is executed first? The left join or the where clause?
Using 3 "selects":
select * from
(
select * from
(
select
...
Hello,
I am trying to use a '>' symbol inside a GOURL to retrieve a report in PDF format automatically to users desktop. I'm actually using a perl script to programmatically request the login page, login using my credentials, and then I use a go url to download pdf report, sending it parameters,(doing URL encoding which includes convert...
I am trying to run a procedure on ORACLE with the thin jdbc client and c3p0.
here's the code that's supposed to run:
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("I_NODE_ID", nodeId);
paramMap.put("I_PARENT_ID", parentId);
paramMap.put("I_STRUCTURE_ID", structureId);
...
Hello,
I am trying to copied records from one table to another as fast as possible.
Currently I have a simple cursor loop similiar to this:
FOR rec IN source_cursor LOOP
INSERT INTO destination (a, b) VALUES (rec.a, rec.b)
END LOOP;
I want to speed it up to be super fast so am trying some BULK operations (a BULK FETCH, then a FOR...
As well as CHAR (CHARACTER) and VARCHAR (CHARACTER VARYING), SQL offers an NCHAR (NATIONAL CHARACTER) and NVARCHAR (NATIONAL CHARACTER VARYING) type. In some databases, this is the better datatype to use for character (non-binary) strings:
In SQL Server, NCHAR is stored as UTF-16LE and is the only way to reliably store non-ASCII charac...
I wanted to load data to remote db using sqlldr.I did it using following command
>sqlldr GANUKA/GANUKA@jdbc:oracle:thin:@172.21.0.180:1521:orcl control=D:\Work\CLSTMAS.ctl
log=D:\Work\CLSTMAS.log
But it gives the following error.
SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
ORA-12154: TNS:could not resolve the conn...
I'm about one click from getting this done and so any help would be great I have this sql code I wrote in Oracle:
SELECT DISTINCT
O.shipcountry, S.companyname,
O.orderid,
TO_CHAR(O.freight, '$999,999.999'),
TO_CHAR(sum(unitprice)*count(quantity), '$999,999.99') as "Order Total"
FROM corp...
i'm using oracle with FluentNHibernate automapping with alterations & NHibernate
the problem is how to specify the constraint name by overriding the mapping model??
the generated sql like this:
alter table FirstTable
add constraint FK_VerLongIdentifierLongerThan30Characther
foreign key (FirstTableID)
references SecondTable...
I've been spending more and more time writing DB Wrappers for Oracle access. This seems to be quite generic procedure, and I was wondering is there already are code generators that generate access routes to Oracle PL/SQL Stored Procedures in C++?
I'm looking for a configurable generation tool that would be capable of managing connection...
Suppose I have two tables, one with blog posts and another with readers and their comments:
Table 1:
table name: BlogPosts:
structure:
id (int)
title (string)
Table 2:
table name: Readers:
id (int)
blog_post_id (int)
name (string)
comment (string)
in the Readers table there is a unique composite key on blog_post_id/name (i.e....
I'm trying to use an old laptop (Win2000 P3 1.1Ghz 256MB ram) as an oracle database server for a small group project of 3/6 people on my college.
I don't need much, just some databases with 2 accounts, 10/15 tables, some views and triggers, however even the simplest database requires 1GB of physical ram (2GB of swap) and the installer re...
I am new to Oracle JDeveloper and Oracle ADF framework. If I do some changes in java files, I do stop oc4j and rebuild in project level, and starting it again. Is that the right way of doing it or do we have any partial/swap build options there?
Thanks
...
Our application supports SQL Server and Oracle as database backend.
During investigation stuff database tuning advisor on SQL Server suggested to create an index on table which resulted significant improvement of query execution time against this table. I'd like to try to create the same index on oracle but a problem with understanding ...
Oracle allows to specify precision of TIMESTAMP type in a table - the number of digits in the fractional part of the SECOND datetime field. Are there any disadvantages of specifying maximal precision TIMESTAMP(9)?
One reason I could think is that this information may be used for prettier output by Oracle tools.
Maximum of 9 digits sugg...
Hello,
I am planning to execute Oracle PL\SQL blocks via JDBC (can't test it yet, question of few days). Is there anything I should know? Does everything work as it used to with plain SQL?
I mean:
ResultSet rs = st.executeQuery("DECLARE BEGIN NULL; END;");
Or will I need some custom classes? I'd like to keep it as much simple as pos...
Hey folks,
In oracle-db it is possible to insert values from table A to table B like
Insert into table_a values
Select * from table_b where ID = 10
;
If the structures are the same.
How can I do this in MYSQL? My Editor gave me an sytanx-error.
Thx 4 your answers!
Greetz
...
how to generate report and save it to file using pl/sql oracle?
...
There are some types with "sys.ku$_" prefix, but is that "ku" abbreviation of something?
Just nice to know things :)
...