Copying data to SQLS Server from 10g

Copying data to SQLS Server from 10g

 

  

Nothing but stumbling blocks trying to do this simple task. I have identical
tables in Oracle and MSS. I need to copy the data over to the MSS from the
Oracle table. Database link to MSS is created and working properly. I have
tried the following...

This does not work due to transaction errors.

INSERT INTO [Email Address Removed] FROM oracle_table

And the following does not work due to this error.
Warning(73,17): PLW-07202: bind type would result in conversion away from
column type

DataRow oracle_table%ROWTYPE ;
CURSOR C1 IS SELECT * FROM oracle_table ;
BEGIN
OPEN C1;
LOOP
FETCH C1 INTO DataRow.col1, DataRow.col2, ....

INSERT INTO [Email Address Removed] (col1, col2, ...)
VALUES (DataRow.col1, DataRow.col2, .... )

END LOOP;
END;

I've tried using TO_CHAR and TO_NUMBER conversions of my record where
appropriate and it still complains about datatypes. Why is this so hard?



Oracle LazyDBA home page