SQL & PL/SQL :: Transfer Data On Uneven Tables

Jan 13, 2011

I'm having problems transferring data from one table to another as as one table as only 2 fields and the one data meant to go to has id which i just want to increment value because its primary key

table bill fields (name, age)Values (gate,85)

table oracle (pl_id, pl_name, pl_age) often wont insert cz data too short

this how i tried and failed

INSERT INTO oracle (TIME_ID) VALUES(SEQ_CUST.NEXTVAL)
(SELECT name, age FROM gates WHERE name = 'gates');

also tried

SQL> SELECT SEQ_CUST.CURRVAL FROM DUAL;
SELECT seq_cust.currval FROM dual;
*
ORA-08002: sequence SEQ_CUST.CURRVAL IS NOT yet defined IN this session

SQL> SELECT SEQ_CUST.NEXTVAL FROM DUAL;
1
SQL> SELECT SEQ_CUST.CURRVAL FROM DUAL;
1
INSERT INTO gate (TIME_ID) VALUES(SEQ_CUST.NEXTVAL)
(SELECT age, name FROM CRIME_ACTIVITY WHERE ID = '1');

or have both tables with

View 2 Replies


ADVERTISEMENT

Transfer Data To SQL Server 2008 / Arabic Data Showing

Jan 15, 2013

I am trying to transfer data from Oracle database table into another table resides in a SQL server 2008. A database link is already set, and data can be selected/queried using

select * from a_table@db_link

the thing is when trying to insert Arabic data from Oracle to a SQL server table

insert into a_table@db_link values(
'N''some data in Arabic'' ,
'11-oct-00',
'some data in English'
);
commit;

its inserted alright, but when we try to display the data it shows like this instead of displaying Arabic, the english data is alright, but also date show as garbage?!!

when trying to insert arabic data directly through SQL server its fine though.I suggested that we transfer data through ODBC to flat files like Acess and then to SQL server but the team rejected it since they're going to do it daily and the data is huge( we are talking more than 28000 records).

View 1 Replies View Related

Transfer Data From Sql Server To EBS?

Jun 28, 2012

I need to transfer data from Mirco Soft SQL server to Oracle data base (EBS).

View 3 Replies View Related

Forms :: To Excel Data Transfer

Apr 8, 2010

I found another way to transfer the data from forms to excel apart from doing it through ole2 or client. So thought of sharing it with all...

Here it goes:-

declare
ifile client_text_io.file_type;
temp varchar2(1000);
Cursor c1 is select ename, job from emp;

[Code]....

Attach webutil to form and just paste the code on a button and log on to scott. The excel file will be created in c: drive with name test.

View 5 Replies View Related

Replication :: Data Transfer From Oracle 10g To 9i

Feb 16, 2011

We need to transfer data from oracle 10g to Oracle 9i in the following condition.

There will be two database server , one is online server where online user fill the form which is generated by java, spring , hibernate and using database 10 g. at day end i need to execute a process that transferring data from online server to offline server that is in oracle database 9i. This process is scheduled. Some security reason client do not kept this two database on same network. My challenge is that transfer data from online server to offline server with applying client security norms.I have option like:

1) Using Oracle replication method, creating materialized view on remote server , refreshing it at regular interval. but database connectivity is not contineous, should i go for that ?

2) Write java application on intermediate server where we write process to get the connection of this two database servers. From java application we call the procedure for selecting data from Oracle 10g and insert into oracle 9i database and using flag on both data to identified how many rows are transfered and how many remaining for trasfer.

View 7 Replies View Related

SQL & PL/SQL :: Data Transfer From Fact To History Table?

Aug 9, 2010

I need to transfer 6 million records from fact tables to history table .. What is the better and fast process to do that.

View 3 Replies View Related

Client Tools :: How To Transfer Data From Sql To Oracle

Jan 18, 2011

want to transfer data from sql to oracle having same structure in both database.

View 3 Replies View Related

Forms :: Transfer Data From Oracle 9i To Serial Port?

Feb 14, 2012

I want to transfer data from Oracle form 9i to serial port.

Serial port is connected to electric board to show.

View 2 Replies View Related

JDeveloper, Java & XML :: Two Separate Database - Transfer Data

Feb 15, 2011

I have two separate databases, I want to send XML file contains a query from one to the other , that read query and return results to a first via XML file.

View 10 Replies View Related

Data Guard :: Transfer Of Archive Log On Standby Database

Dec 9, 2010

I successfully created the standby database and the archive logs were properly moving on both the primary and the standby databases. For the proper transfer of the archive logs on the STANDBY database I used "FAL_CLIENT AND FAL_SERVER" in the pfile of the primary database specifying the location of the primary and the Standby respectively.

When I removed both the parameters from the pfile of the primary database still there was the transfer of the archive logs however there should not be "If I am not wrong" as I have removed both the parameters.

why there is still the transfer of the archive logs on the standby database.

View 3 Replies View Related

Data Guard :: How To Transfer Redo Log Files To Standby Database

May 29, 2010

How to transfer redo log files to standby database..

View 1 Replies View Related

SQL & PL/SQL :: Transfer Data - Arabic Language Column Appears As Junk

Feb 8, 2012

When I transfer the data from Oracle to MS SQL I have one column in a table which is of Arabic Language.The data is fine in Oracle but when I transfer it to MS SQL Server I see that the text in MS SQL server appears as junk.

View 1 Replies View Related

Data Guard :: Transfer Archived Log Files To Standby Database

Oct 8, 2011

1> Does dataguard in 10g use ftp/rsh to transfer archived log files to standby database or some other protocol?

2> In my primary database, archives are getting generated normally, there is no error in alert log file. But archives are not getting transferred to standby database. I am able to connect through sys user from primary server to standby database & vice versa.

Also, tnsping is working fine.

All was working fine till 2 days back & no parameter has been changed from database side. I am not able to transfer the file manually through FTP to standby server. Does it is the problem? Or dataguard doesnt use FTP protocol to transfer the files?

View 2 Replies View Related

Data Guard :: Unable To Transfer Archivelog Wrong Pass File

Aug 2, 2010

I am creating physical standby database through Rman duplicate command from 2 node rac cluster. rman do all its work. now am try to start the mrp process on physical standby database. I am getting following errors

------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
------------------------------------------------------------
ORA-16191: Primary log shipping client not logged on standby
------------------------------------------------------------

I copied the same pass file from primary to standby and many times verify the same but i got the same error.

View 4 Replies View Related

Maintain Large Tables / Cleanup Data From Our Tables

May 18, 2011

I have to cleanup data from our tables (Production Environment) that contain millions of rows. The question is apart from the solution of the partitioned tables what alternative recommended solution suggests Oracle?

To delete these tables by using a cursor PL/SQL block or to import all the database and in the tables that we want to remove the old rows to use the QUERY option of the data pump utility.

I have used both ways and i have to admit that datapump solution is much much faster than the deletion that suffers from I/O disk.The question again is which method from these two is more reliable and less risky for the health of the database.

View 5 Replies View Related

Implementation Where Data From DB2 Tables Are Moved To Oracle Tables

Sep 3, 2012

I came across an implementation where data from DB2 tables are moved to Oracle tables, for BI solutioning, using some oracle procedures called from MS SQL DTS packages which are scheduled jobs.Just being curious, can this be done using OWB or ODI rather than the above detour. I suppose there are some changes being done in those procedures before the data is being loaded into Oracle tables, can't this be done using OWB/ODI? Can it be scheduled too as jobs using OWB/ODI?

View 1 Replies View Related

Oracle Data Pump - Export Data From Schemas Or Tables

Oct 11, 2012

I need to export only the data from schemas or tables, how to do that with Oracle Data Pump? when we use schemas parameter this export all schema, not only the data right?

View 7 Replies View Related

Data Warehouse - How To Insert / Access Data In The Tables

May 30, 2011

I created a data warehouse in oracle 10g n with three Dimension and one cube after that it crates 4 tables . How to use an insert sql statement to insert data in those tables n how to access them.

View 7 Replies View Related

SQL & PL/SQL :: How To Transfer Data From Non-partitioning Table To Partitioning Table

Apr 4, 2013

I have problem to transfer data in non partitioning table to partitioning table.

I have non partitioning table and i create new table partitioning that have same column and type like in non partitioning. So how can i transfer data from table in non partitioning to table in partitioning?

View 10 Replies View Related

How To Transfer Parameter Between Procedure And Shell

Jul 25, 2013

I created a procedure with cursor to inquiry a table. There is more than 1 million records on the table. For each record, I would like to transfer two columns on table as parameter to shell and feedback to procedure as varcahr2.

This is my sample(I only use 10 records for the testing).

create or replace procedure task_file(task_check in varchar2,file_name out varchar2) is
k number :=0;
v_task_number number :=0;
v_task_filename varchar2(30) := null;
cursor jobchk is select task_number,task_filename into v_task_number,v_task_filename from my.tasktable
where task_filename=task_check and rownum <=10;
[code]........

View 1 Replies View Related

SQL & PL/SQL :: Transfer Control From Second Loop To Cursor?

Dec 26, 2012

the problem we are facing is that we are having some problems with names in a filed which are not letters but strange symbols inserted by a webservice which by the way has been corrected, but we have the discrepancy on out DB, so I've decided to write a PL/SQL procedure to correct them.

Here is the example of an incorrect record.

4047254| STEVE; ROVINSON (THE INCORRECT SYMBOL IS CHR(32), I do not know why the forum doesn't show it)

So, if you look there's a symbol that is not interpreted by the DB and my original idea was to extract them and correct then with another procedure. I have originally wrote a procedure with the logic if there's a symbol that is not beween currect letters (from A to Z including semicolon (;)) extract them and that's it. So, the big question is, How I transfer the control from the second loop to the cursor loop in order to analice the next record.

here is the code which hasn't been completed yet.

DECLARE
CURSOR get_nombre IS
SELECT CNTA_NOM_ABRV
FROM CUENTA;

[code]...

View 9 Replies View Related

SQL & PL/SQL :: How To Dump And Transfer Files With Same Table

Apr 6, 2011

how can i dump and transfer it to another year with the same table

View 6 Replies View Related

SQL & PL/SQL :: Transfer From Excel Sheet To Oracle

Jul 24, 2012

How to transfer data from excel sheet to oracle ?

View 2 Replies View Related

Forms :: File Transfer Through Pl/sql Programming?

Jun 15, 2011

I am facing a issue with one of my programming application. We need to transfer a file through pl/sql programming from a unix server to another destination(target) server.

How can we do it through pl/sql programming. I learnt that oracle streams can be used for this.

I do not know what all code is required for this. send me the code for a sample text file.

I also want to encrypt with a password and zip the file

View 3 Replies View Related

How To Transfer Log Files Into Database Table

Dec 20, 2012

I have a requirement. My Front end is Oracle Application. If any user deletes the data from front end screen. One log file should be generated. That file will save in one folder in my server. And That log file consists which code is deleted. And the user name who deleted the code, time and deleting status..

Now my requirement is i have to develop a report to display the log file data. But i don't have a database table to retrieve the data. The data consists Log files. How to transfer the Log files in DB table.

View 4 Replies View Related

SQL & PL/SQL :: Trigger For Updating Two Accounts After Money Transfer

Feb 21, 2012

I get a "ORA-00922 missing or invalid option" after compiling the following trigger:

create or replace
trigger aifer_transfer
after insert on transfer
for each row
[code]......

I want the trigger to affect the transferring account (from_account) with minus the "amount" being transferred from it, and the account transferred to (to_account) with plus the "amount" being transferred to it. My tables looks as following:

TRANSFER
----------------------------------------- -------- ------------
ROWNR NOT NULL NUMBER(9)
PNO NOT NULL VARCHAR2(11)
FROM_ACCOUNTNO NOT NULL NUMBER(8)
TO_ACCOUNTNO NOT NULL NUMBER(8)
AMOUNT NUMBER(10,2)
DATE NOT NULL DATE

ACCOUNT Null? Type
----------------------------------------- -------- ------------
ACCOUNTNO NOT NULL NUMBER(8)
KTNR NOT NULL NUMBER(6)
REGDATE NOT NULL DATE
BALANCE NUMBER(10,2)

View 5 Replies View Related

SQL & PL/SQL :: Transfer Partition Of Table From Source To Target DB?

Apr 6, 2011

I currently try to transfer a partition of a table from a source to a target DB. For first test purposes I take both SYS users to avaoid privilege problems. I created below procedure from code fragments out of the net.The partition CSS_201001 from table CTRL_SETTLED_SHIPMENTS shall be transferred (I tried both with already existing partition and non existing on target destination), but I always get the following error at DBMS_DATAPUMP.OPEN:

Exception breakpoint occurred at line -1 of DBMS_SYS_ERROR.pls.
$Oracle.EXCEPTION_ORA_39001:
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3043
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4769
ORA-06512: at "SYS.TEST_DP", line 20
ORA-06512: at line 2

Listing:

create or replace
procedure test_dp is
-- Handle -- unique identifier for the datapump job
my_handle number;
ind NUMBER; -- Loop index
percent_done NUMBER; -- Percentage of job complete

[code].....

View 7 Replies View Related

PL/SQL :: Create Or Replace Trigger After Insert On Transfer?

Sep 1, 2013

create or replace trigger aifer_transfer after insert on transfer for each new row begin     

   UPDATE Account SET balance = balance-:new.amount        WHERE acc_id = from_acc_id;        UPDATE Account SET balance = balance+:new.amount        WHERE acc_id = to_acc_id;      end if; end;     create or replace trigger bifer_transfer before insert on transfer for each new row begin      if get_balance(:new.from_acc_id) < :new.amount  then        raise_application_error(-20001, 'Not enough money in account!');        end if; end;   create or replace function get_balance(p_acc_id in number) return number as v_balance account.balance%type; begin select balance into v_balance from account where acc_id = p_acc_id; return v_balance; end;    select get_balance(123) from dual..................................................i am geting this error when executing the trigger..................................................Error report:ORA-01912: ROW keyword expected01912. 00000 -  "ROW keyword expected"*Cause:    keyword missing*Action:  

View 12 Replies View Related

How To Transfer Output File From One Server To Another Using Stored Procedure

Apr 9, 2012

We are running a store procedure by calling it from shell script.The shell script is running in Server1 and the stored procedure is running in server2(which is the data base server.).

Functionality of the stored procedure:Generating a tab delimited file and place in a directory.

Requirement: The requirement is that the store should be modified in such a way that it should drop the output file to Server1 itself(The server from where it is getting called).

Attaching the store procedure for reference. mIn the store procedure,we have a variable "lv_file_dir" which currently refers to the directory location in Databse server(Server 2) We have to change this SP such that it drops the generated file in Server1 itself(From where the shell script is running).

Attached File(s)
Procedure.txt ( 3.28K )
Number of downloads: 4

View 2 Replies View Related

Forms :: File Transfer From Server Directory To Client?

Oct 3, 2013

I write a file on database server by following

CREATE OR REPLACE DIRECTORY TEST_DIR AS 'c: emp'
GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
SQL> select * from all_directories;

OWNER DIRECTORY_NAME
------------------------------ ---------------------
DIRECTORY_PATH
----------------------------------------------------
SYS TEST_DIR
c: emp
SYS PUBLIC_DIR
E:PUBLIC_dir

and then

PROCEDURE run_query(p_sql IN VARCHAR2
,p_dir IN VARCHAR2
,p_header_file IN VARCHAR2
,p_data_file IN VARCHAR2 := NULL) IS

[code]...

but I get error wut_118.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved