querying a DB and returning Id's - HELP PLEASE

M

Mark

I need help with the following please

I am dealing with 2 DBs
one local with full write access (can put an sp on it)
and one faraway with ready only access

I need the code to stick in a class that will do this

For each BookingRef in LocalDb
Select * from FarawayDB
where FarawayDB.BookingRef = LocalDb.BookingRef
Copy ID from farawayDB AND LocalDb into LocalDb.MatchedRecords
next
both DBs are on different serversI realise this may be the wrong way but it
gives you can idea that i want to query a DB with bookingsrefs i store in my
local DB, and copy them to a table if they match THanks Mark (newbie)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top