Hi,
Currently I need to run two queries to get both the total amount of items in my resultset as well as the resultset. Is it possible to just get the resultset count as well as the resultset in one pass to the database. I am trying to optimize my code so I don't have to make 2 passes to the database as these individual select stateme...
Is it possible to do something like this?
$ sqlplus -s user/pass "select 1 from dual"
or
$ echo "select 1 from dual" | sqlplus -s user/pass
I know I can put select 1 from dual in a file and do this:
$ sqlplus -s user/pass @myFile.sql
but I'm wondering if it's actually necessary to create a file just to satisfy sqlplus
...
I have the following table and trigger.
CREATE TABLE LogSchema (
user varchar2(100),
date_ date,
operation varchar2(100),
obj_type varchar2(100),
obj_name varchar2(100)
);
CREATE OR REPLACE TRIGGER LogSchema
AFTER DDL ON USER1.SCHEMA
/* can't use ON DATABASE or else it will log
everything that happens on all sc...
Possible Duplicate:
Oracle: is there a tool to trace queries, like Profiler for sql server?
hi all,
i want to know whether there is a similar tool like sql server profiler in oracle. it is really useful. great thanks.
...
I am trying to develop a dynamic GUI for Oracle which would allow the user to select a table dynamically and to perform operations like insert,update and delete. I am planning on using the DetailsView control, but the problem is I need to get the values inserted inside the text boxes. I am trying to use the FindControl method at mode_cha...
I have an Oracle account (schema) of a remote Oracle database. By using this account I can do all kinds of operations such as: query, update, delete and add. But I can't use exp or imp. Now my question is how can I dump all the data in this remote database schema, include table, view, function, procedure, package.
...
I've got a PL/SQL VArray that I'm filling with a BULK COLLECT query like this:
SELECT id
BULK COLLECT INTO myarray
FROM aTable
Now I'd like to pass a slice of this collection into another collection, something like this:
newarray := myarray(2..5)
This should pass the elements 2,3,4 and 5 from myarray to newarray.
I could write a l...
Here is my SELECT query:
SELECT
a.id_auto,
SUM(pozicane_dni * a.poplatok_denny + najazdene_km * a.poplatok_km) celkova_trzba
FROM Auta a
INNER JOIN (SELECT
id_auto,
(SUM(koniec_pozicania - zaciatok_pozicania)) pozicane_dni,
(SUM(najazdene_km)) najazdene_km,
zaloha
FRO...
Is it possible to use the 10g collect command as an analytical function by using OVER PARTITION or some other way?
e.g.
SELECT COLLECT(x) OVER (PARTITION BY y)
FROM table
Every time I try this there is a ora 3113 exception saying 'end-of-file on communication channel'
PS. I know I need to cast the result to make it useful, but for s...
I need to grant privileges to all users, I can do:
GRANT select on table TO user1;
GRANT select on table TO user2;
...
But there are many users. How can I grant this privilege to all users at once?
I tried:
GRANT select on table TO ALL;
But that doesn't work.
...
I didn't realize this, but apparently Python's strftime function doesn't support dates before 1900:
>>> from datetime import datetime
>>> d = datetime(1899, 1, 1)
>>> d.strftime('%Y-%m-%d')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: year=1899 is before 1900; the datetime strftime() methods requi...
Is there an easy way to determine in a SQL Script if the ORACLE Table Partitioning feature is available?
I want to create some of my tables as partitoned tables if the feature is available, otherwise the tables should be created normally. I have a script with my DDL which I use to setup the database via sqlplus.
Thanks.
JeHo
...
WARNING: see my own answer below. The problem is caused by old Oracle drivers that were present on the classpath in addition to 10.2.0.4. Problem solved. Leaving the rest of this question for posterity.
I've been banging my head against the following. Here's a simple POJO distilled from my application code:
@Entity
@Table(name = "PIGGI...
Is there any way to launch Apache server on my laptop with static IP address?
I need a remote access through web-interface to a local Oracle database from the internet.
Right now I have Zend Core installed which allowes me to connect to the database but I don't know how to make it from the internet.
Thank you in advance.
...
I have a super-simple query in a star schema. One fact, two dimensions. I have verified that I am doing the joins properly. But when I execute the query plan, I get a merge cartesian join right before the steps to add the dimensions.
explain plan for
select * from fact f
inner join dim1 d1
on d1.id = f.d1_id
inner join dim2 d2
...
I am using Oracle SQL Developer, but I am having an issue seeing results from a package that returns a ref cursor. Below is the package definition:
CREATE OR REPLACE package instance.lswkt_chgoff_recov
as
type rec_type is record
(
source_cd lswk_tpr.gltrans.tpr_source_cd%TYPE,
...
I'm trying to find an integer number of days between two dates in Oracle 11g.
I can get close by doing
select sysdate - to_date('2009-10-01', 'yyyy-mm-dd') from dual
but this returns an interval, and I haven't been successful casting this to an integer.
Edit: Apparently in 10g, this returns the number of days as an integer.
...
Hi,
We are migrating an application from Tomcat to WebLogic. There are many things we just don't know about. Is there any decent tutorial out there?
We know about this but I'd like to read about experiencies, and/or processed information.
Thanks in advance.
...
The environment is Oracle 9 & 10. I do not have DBA level access.
The problem is to verify that a specific column exists in a specific table, in another schema.
There are two cases to deal with.
Another schema in the same instance
A schema in a different instance, using a db_link
Given my schema FRED and another schema BARNEY...
Hey all,
I'm currently building a web form using APEX that is losely modelled after a "wizard" style. That is, I have forward and back buttons for most pages, etc, etc.
The problem I have is that it seems all my buttons need to be part of a region and that region needs to located in a pre-determined section of the page.
I would prefe...