Need help with Writing a Progress Query

I need to make some mass changes to a database and I need some help with writing a Progress Query.  I need to set the price to 0 for Product Group 0501 thru 6501 and set the effective date as 2/1/2008.  I have attached the code to do this and the code works perfect.  

However, this time around I need to change the items with a Product Code of 0501 thru 6501 AND have and effective date prior to 8/1/2007 to have a price of 0 and set the effective date to 2/1/08.  This would leave all the prices and effective dates intact for items entered on and after 8/1/07.

Can someone help me with the Syntax to add this to the criteria used to change prices?

Thanks,

Chris
/* program to update price and date information */
for each vas.item no-lock where
item.product-code >= "0501" and
item.product-code <= "6501":
 
  for each vas.itemprice exclusive-lock where
  itemprice.item = item.item:
    assign
    itemprice.unit-price1 = 0
    itemprice.effect-date = 2/1/2008.
  end. /* itemprice update loop */
 
end. /* item table loop */

Open in new window

csimmons1324IT ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

c_popCommented:
/* program to update price and date information */
for each vas.item no-lock where
item.product-code >= "0501" and
item.product-code <= "6501":
 
  for each vas.itemprice exclusive-lock where
  itemprice.item = item.item and
   itemprice.effect-date <8/1/2007 :
    assign
    itemprice.unit-price1 = 0
    itemprice.effect-date = 2/1/2008.
  end. /* itemprice update loop */
 
end. /* item table loop */
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
csimmons1324IT ManagerAuthor Commented:
That worked great!  Thanks for all the help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.