troubleshooting Question

Join 3 tables to update Prices based on last Ship Dates

Avatar of summerset
summerset asked on
Microsoft SQL ServerMicrosoft SQL Server 2008
5 Comments1 Solution163 ViewsLast Modified:
I'm having a hard time wrapping my head around this one. I need to find out which products have not shipped in the last 2 years, 1 year and 6 months (three queries) and then update the prices based on a percentage.

The tables I am using are:

BX
BXCNT
STOCK


BX tabele has SHIPDATE and ORDERNO

BXCNT table has ORDERNO and STOCKNUMBER

STOCK table has STOCKNUMBER and PRICE

The BXCNT table is like an order detail that contains all the stock numbers inside the order. That is the way I tie the shipdate to the number

The date format looks like this: 1999-11-18 00:00:00.000

So I want to select STOCKNUMBER and update the PRICE (price * .75) if SHIPDATE > 2 years

Hope that makes sense. Thank you for any help and information.

-S
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros