0

I have two data buckets using a cryptic naming convention.

Am I able to update the data in the fields on the main table where the record entry is equal to the primary key on the other table?

Something like Table1 has 5 columns, t1A t1B t1C t1D t1E and Table2 has 2 columns description, and Table1code.

Am I able to switch the data in Table1 with the description field in Table2?

I have tried doing a sql update/case statement but kept getting non-boolean errors when I would run it.

Any help would be appreciated.

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126

1 Answers1

0

You need to do an update with a join. Have a read of this http://www.bennadel.com/blog/938-Using-A-SQL-JOIN-In-A-SQL-UPDATE-Statement-Thanks-John-Eric-.htm

Tom Squires
  • 8,536
  • 10
  • 45
  • 71
  • Or on SO http://stackoverflow.com/questions/982919/sql-update-query-using-joins/982947#982947 (shameless plug!) – gbn Jun 23 '11 at 16:56