Re: Updating Identical tables
From: Uri Dimant (urid_at_iscar.co.il)
Date: 12/02/04
- Next message: Dean: "Reporting from BPA"
- Previous message: Wayne Snyder: "Re: Updating Identical tables"
- In reply to: F_at_yy@Z: "Updating Identical tables"
- Next in thread: Hugo Kornelis: "Re: Updating Identical tables"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Dec 2004 15:16:29 +0200
Hi
I'm not sure understood you but you can try the following script
What is a condition for INSERT/UPDATE Operations?
IF EXISTS (SELECT * FROM TableA)
UPDATE TableB SET UserId=......
ELSE
INSERT INTO TableB (columns) SELECT columns FROM TableA
"F@yy@Z" <fayyaz.ahmed@mvwebmaker.com> wrote in message
news:uUxCHjG2EHA.3336@TK2MSFTNGP11.phx.gbl...
> Hi All
>
> I have two tables table A and table B, all fields are same in A and B
except
> table B has one extra field User_Id. I need to select fields data from
Table
> A and Update/Insert in Table B with User_Id. What I am doing first reading
> the data from Table A and then inserting/updating in table B .
>
> As I have so many tables to read and Insert/Update which is lengthy
process.
>
> My Question is, is there any other way to do this some sort of mapping
> fields or tables ?
>
>
> Regards
>
>
- Next message: Dean: "Reporting from BPA"
- Previous message: Wayne Snyder: "Re: Updating Identical tables"
- In reply to: F_at_yy@Z: "Updating Identical tables"
- Next in thread: Hugo Kornelis: "Re: Updating Identical tables"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|