troubleshooting Question

SQL update logic

Avatar of jgordin
jgordin asked on
Microsoft SQL Server 2005SQL
5 Comments1 Solution205 ViewsLast Modified:
i need to update using SQL columnA of table1 with value from either table2,table3,or table4 based on:
  if table1.columnB=table2.columnX and table1.columnC = table2.columnY
       table1.columnA = 0
  if table1.columnB=table3.columnX and table1.columnC = table3.columnY
      table1.columnA = 1
  if table2.columnB=table4.columnX and table1.columnC = table4.columnY

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros