• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1062
  • Last Modified:

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

0
csimmons1324
Asked:
csimmons1324
1 Solution
 
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
 
csimmons1324IT ManagerAuthor Commented:
That worked great!  Thanks for all the help!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now