Delete from Oracle table based on IDs in a SQL table



I have a requirement to delete some rows in an Oracle table (Oracle 9i)
based on a look-up from a sql table (SQL Server 2000). The following
query is the one I would like to use, utilising linked servers.

delete from ORACLEDS..MYSCHEMA.CUSTOMER
where CUST_ID in
(select cust_id from SQLCustTable)

Unfortunately we cannot use linked servers as the Oracle tables contain
NVARCHAR2 columns which SQL does not understand with any Oracle drivers
(ODBS, OLE DB etc..), although please correct me if I am wrong on this.
We do not have the ability to change the data-types in the Oracle
table.

I have been trying a few different solutions to no avail. So is it
possible to do it using any of the following:

1. Two seperate SQL Tasks. The first querying the SQL data source and
putting the IDs into a global temporary table. The second task using
the Oracle data-source but somehow being able to look at the SQL
temporary table

2. Similar to 1 but putting the IDs into a Global variable rather than
a temp table. Then using an ActiveX script to generate the SQL of the
second task dynamically by looping through the global variable. I have
a feeling this is possible but I do not like the solution so I have not
tried it yet!!

3. A Data Driven task, where the lookup returns multiple rows. I see
lots of examples on how to write activeX scripts to handle a lookup
with multiple columns, but none with multiple rows.

4. Any other method!!


Thanks in advance for your time.

Regards,
Patrick.

.



Relevant Pages

  • Re: Limit of 1050 columns for ANSI joins
    ... comprehensive than Oracle SQL. ... I'm trying not to have any auto-generated SQL on my system, ... Index your schema properly and think about the proper design. ...
    (comp.databases.oracle.server)
  • Re: I cant find a SETUP.EXE in the SQL Plus Client ??
    ... someone else's server for testing some SELECT statements I'm ... free client because I don't own the Oracle license. ... SQL statements. ... There is no documentation with that download. ...
    (comp.databases.oracle.tools)
  • Re: How to convince my customer to use SQL2005 instaed of Oracle10g
    ... the old Sql versus Oracle debate. ... If I were you I would focus one SQL Server 2005 clearest advantages ... You mentioned Availability, so I assume your looking into HA (high ...
    (microsoft.public.sqlserver)
  • Re: How to convince my customer to use SQL2005 instaed of Oracle10g
    ... migration to Sql 2005 would be direct & straight forward, quick, and ... If I were you I would focus one SQL Server 2005 clearest advantages ... would need a 4 processor license but for Oracle you would need a 16 ... You mentioned Availability, so I assume your looking into HA (high ...
    (microsoft.public.sqlserver)
  • Re: SQL Server 2005 vs Oracle
    ... SQL and Oracle. ... SQL Server one sizes log files to handle the largest transaction and its ...
    (comp.databases.ms-sqlserver)