• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Repeatable SQL

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have a requirement like this below.

Table A contains data as below.

id Name Tasks

1 test IA
2 best ABC
3 zest IA
4 east BCD
5 west IA

Now column id is a foreign key referring to column cid in table B

cid Name

1 test
2 zest
3 east
4 west

Now my requirement is to update the table A's "Tasks" column based on the following conditions:
1> when Table A's "id" and Table B's "cid" columns match.
2>only update task column when it contains value as "IA" with ""(blank)

Can any one please help me?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about a subquery to determine the rows to update?

 
reply
    Bookmark Topic Watch Topic
  • New Topic