The code is this:
Originally:(http://www.oracle-base.com/articles/misc/FTPFromPLSQL.php)
The approach uses a combination of the UTL_TCP and UTL_FILE packages to create a simple FTP API (ftp.pks, ftp.pkb). Once the API is loaded into the appropriate schema simple FTP commands can be initiated as follows:
CREATE OR REPLACE DIRECTORY my_...
I'm using the latest NMG version 2.0 RC1 to generate Fluent mappings for an Oracle 10g database. Unfortunately it is detecting multiple instances of many of the database columns, so my output includes up to 5 definitions for each column, all with the same name.
I am working with hundreds of tables, so I really do not want to go through...
Hello...I have a Report in SSRS VS2008 that needs to run a Stord Procedure from Oracle. In the past I have run functions from Oracle that return tables in order to display the data. As well as straight forward SELECT statements
For example:
select * from table(MyFunction(:parm1, :parm2))
select * from MyTable
I have not run a Store...
I have built a "best guess" query to get the related table.column for a sequence. Is there a better, cleaner method to get this relation?
select ut.table_name, ut.table_owner, ut.trigger_name, us.sequence_name
,upper(dbms_metadata.get_ddl('TRIGGER', ut.trigger_name, ut.table_owner
)) triger_ddl
,to_char(regexp_substr(
upper(d...
I need to build a string from some columns into another column, the trailing zeros must be removed from month and day :
YEAR=2008;MONTH=1;DAY=1;ID=1021; ... etc
For the day piece I've used the TO_CHAR(D_RIC,'D') function to remove leading zeros. Is there a format option for months to remove starting zeros too ?
...
Hi,
We are using CR XI on Oralce. We applying RLS (Row Level Security) in DB. RLS will base on information we set in the session (by calling trans_pkg.set_username('abc')) to decide which data rows can appear in dataset. But CR seems to have its own Connection to Oracle. We have no way to run a package like: trans_pkg.set_username('abc'...
I was going through some old code that was written in years past by another developer at my organization. Whilst trying to improve this code, I discovered that the query it uses had a very bad problem.
OdbcDataAdapter financialAidDocsQuery =
new OdbcDataAdapter(
@"SELECT a.RRRAREQ_TREQ_CODE,
...
In my Data Control Palette, I have a table. That table has a Yes/No column...lets call it: 'A1'. Now I drag and drop off 'A1' as an AF:SelectOneRadio component. When the dialog box pop up for me to fill out the bindings, I use dynamic. For the 'base data source attribute' I use A1 and for the 'list data source attribute' I use a column c...
I want to set the environment variable long based on the size of the XML data I'm trying to retrieve. The idea is something like this:
var XML_DATA_SIZE number;
SELECT TRIM(LENGTH(xmltype.getClobVal(xml_data)))
INTO :XML_data_size
FROM xml_tab
WHERE key = '1234';
print XML_DATA_SIZE
set long XML_DATA_SIZE
set pagesize 0
set li...
Context: logging table changes, and we don't want to accidentally mess up the log entries. This is an internal, non-financial app, so we're not worried about hostile modification.
I thought I could just revoke delete/update, but it turns out you can't do that to yourself:
ORA-01749: you may not GRANT/REVOKE privileges to/from yourself...
Hi, I am just setting up a test project using Oracle Streams.
My first problem is, is there something I need to install first? How can I tell if Oracle Streams is installed ?
...
I created a package and a package body as below:
Create or replace Package pkg_1
as
procedure main(param1 varchar2, param2 varchar2, param3 int);
procedure one(param1 varchar2, param2 varchar2);
procedure two(param1 varchar2, param2 varchar2);
end pkg_1;
/
create or replace package body pkg_1
as
procedure main (param1 varchar2, param2 ...
I am just getting started with on a project and hope to use Oracle streams.
I am looking for a straight-forward, hello-world type of example using Oracle Streams. Can you point me to a tutorial or show me an example?
Thanks
...
I have 2 procedures (A,B) in Oracle 9i. In individual, they all work fine. But I cannot make a procedure C that calls A, which in turn calls B. I put a dbms_output.put_line before C calls A, before A calls B and one in B. Somehow, only the first put_line works. What are the possible reasons why this doesn't work? Thank you,
CREATE OR RE...
I have a simple delete procedure which is using na cursor. I read somewhere that table vars should be preferred to cursors.
CREATE OR REPLACE PROCEDURE SMTAPP.LF_PLAN_VYMAZ (Str_oz varchar2, Num_rok number, Num_mesiac number, Str_s_trc_id varchar2) IS
var_LF_PLAN_ID Number(20);
cursor cur_plan is select id from lp_plan where lf_...
I need to pass an array from C#.net application to oracle stored procedure.
Can anyone please let me know how to go about it?
Also, which OracleType type do I use in C# when passing input parameter to stored procedure?
FYI, am using System.Data.OracleClient in my C# app.
Thanks.
...
Certain event needs to happen before the end of the year when it's 10 years since the previous event. I'm issuing a query like this to calculate the deadline:
SELECT
:previous_date AS previous_date,
ADD_MONTHS(
TO_DATE(
EXTRACT(
YEAR FROM TO_DATE(:previous_date, 'YYYY-MM-DD HH24-MI-SS')
...
i'm using the following article:
http://doc.qt.nokia.com/4.6/deployment-windows.html#linking-the-application-to-qt-as-a-shared-library
trying to build static build.
when i try to load the command:
configure -static -plugin-sql-oci
i get the following error msg:
WARNING: Qt does not support compiling
the Oracle database driver w...
A bit of background: I have a staging table without constraints which gets data for a given day, then some subsequent code that merges that data into a table with a key on it. I can get rid of perfect duplicates easily using this handy piece of code:
delete from tbstage where rowid in (
select rowid from tbstage
minus
sel...
Hello everyone,
I am currently trying to code our existing desktop application in JSP.
To be able to maintain sustainability, have visual effects and get functionality, I have decided to use JQuery.
After starting to code a month ago, we now realized that these pages are bringing a heavy usage of libraries (JQuery and JQueryUI librar...