Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Need help with SQL coding


Message #1 by "bill salkin" <wsalkin@h...> on Fri, 4 May 2001 04:02:02
I have two tables. Table A has ZIP and SolicitCount fields; Table B has 
only a ZIP field.

Every month I get new ZIP data and store it in Table B.
I want to take the records in Table B that aren't in Table A (based on PK 
value) and simply insert them into Table A. If a record in Table B already 
exists in Table A then I want to increment, by 1, the value of 
SolicitCount in Table A.

How can I do this operation using T-SQL?

TIA,
Bill

  Return to Index