Update table

Last Post 27 May 2009 10:36 AM by JASBRYDEN. 0 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

27 May 2009 10:36 AM

I need some help with a script.

I have two tables

table 1 (BTGroupSpecial)
This has ITemNo and TierUnitLevel1 and TierUnitPrice1

Table 2 (BTpricingdetail)
this has priceschedule, itemno and unitsell

I want to have a script that would update Btpricingdetail, (itemno is common in both of them, and btpricingdetail has all of the item numbers in it, while BTGroupSpeical only has a few of the item numbers.)
when TierUnitLevel1 ='1' and priceschedule='1'

This is what I have but I it is not working.

update BTpricingdetail
set unitsell=TierUnitPrice1
from BTpricingdetail
left join BTGroupSpecial on
BTpricingdetail.itemno=BTGroupSpecial.itemno and
TierUnitLevel1 ='1' and priceschedule='1'

What I am doing wrong ?!?!?

Acceptable Use Policy