Notices


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-Nov-2009, 07:42 AM
Member
 
Join Date: Feb 2008
Location: Cape Town, South Africa
Posts: 86
preycor 0 reputation points
Default JDBC: Update info in another table

I've been having trouble updating information in a secondary table and have decided to try taking a fresh approach - perhaps I'll get better joy.

I have a database with two tables which I'm interested in: MASTER, TAG

In MASTER the primary KEY is MST_SQ and in TAG the primary KEY is TAG_CODE. However, in TAG there is also an entry MST_SQ.

This would mean that for every tag a person has, they have a record in KEY with their MST_SQ.

When a person's account is disabled, I want to disable all the tags associated to them. The disabling of the tags in handled by setting a value in the TAG table (TAG_SUSPEND) to '1'.

If the MST_SQ is 10, this would mean that the SQL statement to disable all tags should be: update tag set tag_suspend=1 where mst_sq = 10

How do I achieve what I want? I would appreciate any assistance.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 10:27 AM.


© 2007 Novell, Inc. All Rights Reserved.

Search Engine Friendly URLs by vBSEO 3.3.0 RC2