I have a query, much like the one below, that I'm trying to convert to PL/SQL. I've tried to wrap the whole thing up into an EXECUTE IMMEDIATE, but that's didn't work either. Could someone p...
I am very new to Oracle stored procedures. I am trying to return a recordset from my Oracle database using a SQL query (inside a stored procedure) with one input parameter. I understand I need...
I have a stored procedure I'm using to return a recordset with a cursor as an out parameter to return a recordset. I'm seeing some strange data when I bring the data into Crystal Reports. ...
I am completely newbie for Oracle and Oracle SQL Developer and I need a bit guidance.
I have ready Oracle DB and I am trying to find the problem in some data fetch. I want to see the returned...
Hello,
Could you please give me the proper syntax to calculate the # of days betwen dates
both fields are date types and I need a number result.
Date1 - Date2 = #of Days
Also, if the...
I'm a sql newbie witha n oracle query giving an ORA-01427 Error
UPDATE FIPS_CODE
SET GROUP_CODE = (SELECT group_code FROM GROUPS WHERE GROUPS.FIPS = fipscd)
WHERE EXISTS (SELECT group_co...
I have an Oracle 9i v2 installation in my computer. I have 2 tables, table "SCHEDULE" and "ROUTES". I have a field in first table ("SCHEDULE") named "ATIME" and a field in second table named "...
Hi,
Ok I have 2 tables in my oracle database - say TABLE 1 and TABLE 2.
They are exactly the same except TABLE 2 has 2 additional columns to TABLE 1.
I want to populate TABLE 2 with t...
Hi, can someone give me the correct syntax for using the SQL imp command in Oracle? I am following several work cases in the newly released book Pro Oracle Spatial. They instruct to execute th...
Is it possible to replace more than one word using the replace function so i currently have
select replace(et.subject, '*CONTRACT_ID*', CI.CONTRACT_ID) as subject
but want something li...
Hi Experts:
In my schema, I have about 1500 tables. I would like to generate a "Create Table" script for all the tables in this schema. I tried using TOAD but it gets stalled.
Similarly, ...
In my package I have several Procedures. What is the difference between a local variable and a global variable?
Does a local variable have to be declared in each of the procedures?
I am trying to declare a variable in SQL plus using the SQL Plus tool, not create a package but using the user interface tool. Then set the variable using a value from a SQL statement. Then ...
I would like to create a function to get the first day of the week(Sunday) by using the sysdate and if the value return is Sunday, I would like to get the previous Sunday's date.
Hi,
Is there a way to format the results of a query so that it displays on 2 decimal points. I specifically need to do this with the 3rd column of the query result. Thanks!
SELECT ...
This is the error, Line 15 which is the last DBMS_OUTPUT line. I been on this one a while going around in circles. What am I doing wrong?
ERROR at line 15: PL/SQL: Statement ignored
1. C...
I have an Oracle table with a BLOB type column called attachment.
I want to insert any binary file (it can be a word document, powerpoint file, Excel sheet nor even an image) into this attach...
Hi Experts.
I am logged on as the objects owner with full privileges and I have tried to grant privileges to several people using the script below, just changing the user name and password....
Hi,
I have a query that returns about 100,000 records in about .2 seconds. However, I need to return the count(*) of these records, and that takes about 17 seconds. I have tried various sql ...
How can get a cursor count in oracle.
Basically, I have a stored procedure and I want to get a cursor count after opening it, but before fetching any records. Is that possible?
%rowcoun...
I am creating an extract in SQL of some Oracle database columns. However, when some of the columns are blank, they do not SELECT. I would like to know how to SELECT a given column and insure...
Hi,
I have some SQL that updates a table and I would like to improve it. As you can see from the code below it updates TableA from a select query based on a couple of other tables. This ...
Dear Experts,
My problem is as follows,
I have a Package, PKG_SETTLE_POLICY_PROCESS which has several procedures, but the one causing the problem is P_PROCESS_INSTALLMENT
Now this pro...
How do I convert decimal data type to integer and char(8) data types
table name
titles
column name
PRICE
21.99
19.95
39.95
12.99
6.95
19.95
23.95
10
13.95
This is an exam...
as follows:
Monday, the Twenty-Fourth of May, 2009
TO_CHAR( 'fmDAY, DD MONTH, YYYY')
Its the DD part I need something else for.
Thanks!
Rolf