OK. I think we're getting somewhere. Going back to the original resonse, you
can do this with a T SQL statement. Knowing a little about your data
Post by Transam388Well I am the one belaboring this...not you!
OK, now if a field is basically what I see at the top of "Open table, return
all rows" I have been calling "Row" in all these posts. Now the "Fields" or
"Rows" do not have matching names but yes they contain the user photos and
that data needs to be updated in B from that which is exported from A. So
totally overwrite the current photo in DB "B" with the updated ones exported
from DB "A".
Now "Matricola" is not a person but a screwed up "Field" or "Row" name in
the source DB for the user ID. So I have user ID 1 through 50 and each has a
photo associated with it in the source and target DB. In the target DB I
want to make sure that the photo is again associated to the correct ID based
on those fields "Matricola" from Source and "ID" on target DB.
This sounds as if it may be getting much more in depth so I may have to
bring in a higher level DBA to just write a script or query that can do this.
again, if you can hang on with my banter and we get this though I owe you!!
Thanks Todd!!
Post by Todd CNot to belabor the point, but is it that "Photo" is a field NAME in table A
and not the CONTENTS of some field? And it needs to be copied over to a
matching field in table B, right?
If so, are you wanting to update ALL the 'Photos' in B with their correct
'Photo' from table A, or just the one for somebody named 'Matricola'?
You need to look for a way to join the two tables together. Does Mr.
Matricola have an ID in Table A that is the same as his ID (or PIN) in Table
B? Use those two fields as the joining clause. If not, you will need to find
one that is UNIQUE, or build your own mapping table.
--
Todd C
You appear to have it. Basically this is a set of security DB's that have
user ID's associated to photos. Now this holds true in the DB we want to
update but the table and rows are called different things. I'll try to give
a layout.
DB "A" Source DB
Table "Users"
Row "Photo" is what is to be exported
Row "Matricola" is what needs to be matched on DB "B" so that photos are
associated to the same user ID in the target DB.
DB "B" Target DB
Table "BADGE"
Row "PIN" data to be replaced by that exported from DB "A" based on a match
with
Row "ID" from DB "B" and Row "Matricola" from DB "A".
Thanks again for your help on this Todd!!
Post by Todd CNot sure I understand the question.
You are moving data from the Users table in Db CEIA to the Badge table in Db
AC.
What do you mean by rows Photo and PIN? Is there a column in table Users
that has a value of "Photo"? Is there a column in table Badge that has a row
of "PIN"?
Can you sketch out an abbreviated table schema for us?
Thanks
--
Todd C
Thank you Todd. If I may as this I claim to know not much but I am a little
familiar with the Query Analyzer.
Two Databases on same server. DB names CEIA and AC.
Now we want from DB CEIA, the Table "Users" and row "Photo" to be placed /
updated into the AC database in table "Badge" and Row "PIN".
Now here is the catch, we want from CEIA, same table but row "ID" to match
on the target so the photos match where they currently are as far as user ID
on the source DB verus it just puts the photos in the order it read them
regardless of if the ID number matching.?
Thanks again man!!