I am performing the following SQL select (attached) to create a fixed-flat file. One of the columns I am selecting is numeric with a decimal within the column. In my select, I am converting...
Hi,
I have created a procedure that searches tables in the database.
Table name is decided at run time and i want the output of the query to be in REF CURSOR or PLSQL table to increase the ...
I am trying to build a stored procedure where the output will become the datasource for Crystal Reports. I was trying to follow guidance provided in the article "Using Ref Cursors To Return R...
Is it possible to a BEGIN ... END inside a for-loop. In the example below, the cursor is pulling SQL statements from a table and executing them one-by-one. Some of the statements will throw ...
Hi ,
Here i created a package with a stored procedure that has two cursors . here's the code
create or replace package usersandroles as
type sec_userset is ref cursor;
type sec_rol...
Hello, I am fairly new to Oracle SQL. I am using TOAD for Oracle (Quest Software) for developing. When running the following with TOAD, all items are executed correctly. However, when savin...
Hi,
I have put together an oracle query that is based on quite a few unions- it executes and the returned data appears to be correct. However, it is incredibly slow. I know there has to b...
I'm getting a syntax error when trying to create table as with a decode, without the double quotes around "Y" it will stop at the first encounter of Y. Any suggestions on how to get this to w...
How do I update/insert into Oracle real fast.
(Avoid MERGE command, avoid SELECT to check for record existence prior to update/insert)
this is basically my stored procedure in a package..
procedure logdate(Logstart Date, Logstop DATE)
delete * from table where thisdate >= logstart AND thisdate <= logstop;
the format ...
Is Execute immediate will commit the update statement execute before?
In the example below when error happen when execute procedure Proc_1 at update table2, i notice that the update statement...
Hello,
I am getting compile error on below procedure. I am using oracle 9.0.1 and higher versions. What is the solution for insert and update statment if i want to add and update rows of ...
I am trying to recreate a data structure similar to one in another database the only difference is that I have a view in one database and I want to recreate that view as an actual table in an...
Hi all, I have a table that holds log data. It has a date column. What I want to do is to be able to group this data by month (I can do this), but also by year. So I get something like the fol...
need convert FMX file to FMB file,,, can any body help me ?
I want to pass in a value P_CARD to my FUNCTION
And then return a BOOLEAN value of TRUE or FALSE.
What I want to know is if the code below will work.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
Hi,
I am using Toad 9.7.2 client to connect to oracle 10g database. Is there is a way i can export ddls of entire schema/user. Also how can I do it using SQLDeveloper 1.5.3. Please advise....
I need to count the number of records within a table for multiple fields. I am curretnly using count for each filed. Is there a way to combine the count function?
Select count(MARKET) f...
I am studying oracle cursor
http://www.techonthenet.com/oracle/cursors/attributes.php
it has texts like below ......
Cursor with parameters
=======================
The basic s...
I am new to PL/SQL and I have a package that executes as part of a job. When it executes, it fails with the following error:
Low-level errors:
COMP-FO Clean: DBD::Oracle::st execute faile...
Hi,
On our server files gets created everday. One process creates a directory with todays date(YYYYMMDD) and puts some files in that directory. I would like read all files from this direc...
Hi all,
I'm using Oracle 10.2.0.3 on WinXP
2 parts to this question.
1. The code sample shows the use of regexp_replace to attempt to remove all the namespace prefixes from a block of...
Hi,
I would like to ask the experts if is it possible to create dynamic cusrsor in PL/SQL language where as parameter will be used table name.
Declare CURSOR cur is Select * from <defined...
I want to do a SQL query in Oracle that will add a dummy column with no data in the column. I can do the following: select file_num, name, 'dummy_column' from pd_file where file_num = '123456...
There is a primary key(constraint_pk) on col1 and col2 of the table Sample
Step 1: Dropping existing constraint
Alter table Sample drop constraint constraint_pk;
Successfully completed
...