Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL select statement

Status
Not open for further replies.

maximas

Programmer
Nov 29, 2002
40
US
Hi:

I have 2 tables, A and B
table A have 3 columns A1, B1, C1
table B have 3 columns C1, D1, E1
select A.A1, A.B1, set B.C1 = A.C1, A.D1, A.E1. from A, B where A.A1 = C.D1.

how could I set the third column to table B instead of records from table A. I'm trying to get all the records from table A and B and the same time replace the records in memory from table A column C1 to table B column C1.

Is this possible?
 
If you just want pure select statement

select A1,B1,B.c1,D1,E1 from a,b where a.a1 = b.d1

-------------
If you want to really update table A column C1 by B.c1

update a set c1 = b.c1 from b where a.a1 = b.d1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top