Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-29-2008, 08:26 PM
D.Stone@ed.ac.uk
 
Posts: n/a
Default Conditional data copy SQL Server to Oracle

I wonder if anyone could offer some guidelines on the following
problem?

I need to transfer records from a SQL Server table to an 'equivalent'
Oracle table; however if the primary key for any record already exists
in the target table, the source record is skipped.

I want this process to be executed via an Access front-end to the SQL
Server.

What I'd roughed out was the following:

(1) The Access front-end contains a form with a button or simply a
menu option which fires off some VBA code
(2) The code runs a stored procedure on SQL Server back-end (I have
some sample code to do this - it basically uses ADO Command object)
(3) The stored proc calls sp_start_job to start a pre-created job on
the back-end which runs a DTS package

Sounds complicated, but hopefully each of 1-3 above is pretty minimal.

The DTS package itself can be set up to do the SQL Server -> Oracle
table copy via the Designer GUI. Some minimal ActivX code seems
necessary to avoid copying records in the event that SITS already
contains the student. A 'transformation script' (see
http://msdn2.microsoft.com/en-us/lib...9(SQL.80).aspx) sounds
just the thing for this as it applies to the data being transferred on
a row-by-row basis.
The number of records to be transferred is not large (1000-2000), so
performance is not an issue.

Thanks for any feedback,

Dave
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-02-2008, 05:04 AM
DA Morgan
 
Posts: n/a
Default Re: Conditional data copy SQL Server to Oracle

D.Stone@ed.ac.uk wrote:
> I wonder if anyone could offer some guidelines on the following
> problem?
>
> I need to transfer records from a SQL Server table to an 'equivalent'
> Oracle table; however if the primary key for any record already exists
> in the target table, the source record is skipped.
>
> I want this process to be executed via an Access front-end to the SQL
> Server.
>
> What I'd roughed out was the following:
>
> (1) The Access front-end contains a form with a button or simply a
> menu option which fires off some VBA code
> (2) The code runs a stored procedure on SQL Server back-end (I have
> some sample code to do this - it basically uses ADO Command object)
> (3) The stored proc calls sp_start_job to start a pre-created job on
> the back-end which runs a DTS package
>
> Sounds complicated, but hopefully each of 1-3 above is pretty minimal.
>
> The DTS package itself can be set up to do the SQL Server -> Oracle
> table copy via the Designer GUI. Some minimal ActivX code seems
> necessary to avoid copying records in the event that SITS already
> contains the student. A 'transformation script' (see
> http://msdn2.microsoft.com/en-us/lib...9(SQL.80).aspx) sounds
> just the thing for this as it applies to the data being transferred on
> a row-by-row basis.
> The number of records to be transferred is not large (1000-2000), so
> performance is not an issue.
>
> Thanks for any feedback,
>
> Dave


I can't think of much worse than front-ending Oracle with Access. Why
not just go direct from Oracle to SQL Server? And look at Oracle's
MERGE statement:
http://www.psoug.org/reference/merge.html
The docs on it are at http://tahiti.oracle.com.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:38 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145