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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update nulls being pulled bacl

Status
Not open for further replies.

stephenk1973

Technical User
Jun 11, 2003
246
0
0
GB
I have a problem with an update query, sometimes there is no record in the barcodes table and an update is not possible. How do i stop it from trying these 'null' updates.

Thanks

Stephen

update wrk_items a
set (sty_id, season, sty_num, sty_qual, bf_mat_char_val, wsty_size,lsty_size, barcode_valid =
(select b.sty_id, b.season, b.sty_num, b.sty_qual, b.bf_mat_char_val,b.wsty_size, b.lsty_size, 'Y' from barcodes b where a.sty_barcode = b.sty_barcode) where (a.sty_id = 99999 or a.sty_id is null or a.sty_id = 0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top