original simple table A
------------------------
rowid id name
123 1 A
124 4 G
125 2 R
126 3 P
index on A.id
-------------
id rowid
1 123
2 125
3 126
4 124
updated simple table A
----------------------
rowid id name
123 1 A
124 5 G
125 2 R
126 7 P
Assumin...
I have a script to create table and related structures
DROP TABLE CDR.ExtDL_JobStatus;
--
-- TABLE: CDR.ExtDL_JobStatus
--
CREATE TABLE CDR.ExtDL_JobStatus(
Id NUMBER(38, 0) NOT NULL,
ShortName NUMBER(38, 0) NOT NULL,
Description NUMBER(38, 0) NOT NULL,
CONSTRAINT PK_ExtDL_JobStatus PRIMA...
Here's what I want to achieve:
I have a number of categories, each one with products in it.
I want to produce a report that shows various information about those products for each category. So I have a query that looks something like:
select
category,
count(products),
sum(product_price),
from product
group by category
So far so goo...
Suppose I have a table and an index on it
original simple table A
------------------------
rowid | id name
123 | 1 A
124 | 4 G
125 | 2 R
126 | 3 P
index on A.id
-------------
id rowid
1 123
2 125
3 126
4 124
At this point, I execute this DML statement
UPDATE A SET id = 5 WHERE id = 4
What e...
I am working on a system to track a project's history. There are 3 main tables: projects, tasks, and clients then 3 history tables for each. I have the following trigger on projects table.
CREATE OR REPLACE TRIGGER mySchema.trg_projectHistory
BEFORE UPDATE OR DELETE
ON mySchema.projects REFERENCING NEW AS New OLD AS Old
FOR EACH RO...
I am looking to replace values in a particular column. For example the following column values
column name
----------
Test1
Test2
Test3
Test12
Test14
should be (replacing est1 with rest1)
column name
----------
Trest1
Test2
Test3
Trest12
Trest14
I know this should be simple but not able to get the exact function. Any help is apprec...
I have installed jdk1.6.0_21 and sqldeveloper(using alien) on debian(lenny). Now when I run sqldeveloper it asks for J2SE installation path, after I type the jdk path it exits with the below error message.
Oracle SQL Developer
Copyright (c) 2008, Oracle. All rights reserved.
Type the full pathname of a J2SE installation (or Ctrl-C t...
Coming from SQL Server, I am learning some Oracle syntax.
This is my table DDL
CREATE TABLE "CDR"."EXTDL_REPORTSETS"
(
"ID" NUMBER(38,0) NOT NULL ENABLE,
"SHORTNAME" NUMBER(38,0) NOT NULL ENABLE,
"DESCRIPTION" NUMBER(38,0) NOT NULL ENABLE,
"ASOFSTARTDATETIME" NUMBER(38,0) NOT NULL ENABLE,
...
I've successfully installed native Oracle on 10.6, and can successfully compile and execute the example Pro*C code using the 'oracle' account (i.e. the same OS user that the software was installed under). That was a fun job. It even works with clang.
However, in our normal development environment, the source, build scripts, make files, ...
I'm trying to link SQL Server 2005 to an Oracle 10g database. I've installed the Oracle client on the SQL server and validated that I can connect to the Oracle database using both tnsping and sqlplus. When I try to run a query in SQL Server I get the following:
OLE DB provider "OraOLEDB.Oracle" for linked server "ORA_CSSA2APD" returne...
Hi
I have installed SQL Developer in my system, but how can i utilize the GUI.
I am new to this and i want to import datas from Excel to Oracle database using SQL Developer
Thanks in advance
...
Hi all,
is there any way compiling plsql from command prompt not by opening sqlplus and writing the command or @filename?
We want to import the output to a file and parse it for a code review tool we are working on
Thanks...
...
I'm using an Oracle DB and I'm trying to fetch data from its tables using PHP. One of the tables contains a date column which behaves strange to me.
When I open the table in my DB client (I'm using Navicat Lite) I see dates like "2007-11-29 10:15:42" but when I retrieve them with PHP and display the date it says "29-NOV-07". I use a sim...
I'm using SQL Navigator that is connected to the Oracle server of our company.
Whenever I run a query or two and exit the program, it prompts the following confirmation window:
I don't think that I have pending transactions. To close the program, I have to click on Yes or No and this is annoying. I also tried that: I opened the pr...
I am trying to execute a procedure that returns a stored procedure. My version of Oracle DB is 9.2 and the ODP .NET version is 10.2.0.100
My C# code looks like this.
OracleCommand od = new OracleCommand();
od.Connection = oc;
OracleParameter opBranchNo;
OracleParameter opSysRef;
od.CommandType = System.Data.CommandType.StoredProcedure;...
When you execute the following block in Oracle SQL Developer
set serveroutput on format wraped;
begin
DBMS_OUTPUT.put_line('the quick brown fox jumps over the lazy dog');
end;
You get the following response
anonymous block completed
the quick brown fox jumps over the lazy dog
I am basically trying to use PRINT so I can track prog...
Hello,
I'm running requests on an Oracle database.
One of my tables contains time slots for Elements and there can be several time slots for the same Element so that the following example is correct :
ID ELEMENT_ID BEGIN_DATE END_DATE
--------------------------------------------
1 1 01/01/2007 01/06/2007
2 ...
Using PHP, I'm trying to download a blob file that has already been uploaded to an Oracle 10g database. I've seen and imitated numerous examples I've found. When I access the page a File Download dialog appears allowing me to Open or Save. If I click Open, media player comes up as it should but never retrieves the file. If I choose Save,...
Is this the best way to determine if an Oracle date is on a weekend?
select * from mytable
where
TO_CHAR (my_date, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') IN ('SAT', 'SUN');
...
I've been trying to figure out why the following code is not generating any data in my ResultSet:
String sql = "SELECT STUDENT FROM SCHOOL WHERE SCHOOL = ? ";
PreparedStatement prepStmt = conn.prepareStatement(sql);
prepStmt.setString(1, "Waterloo");
ResultSet rs = prepStmt.executeQuery();
On the other hand, the following runs properl...