Page 1 of 1

Pricing in SQL

PostPosted: Fri Dec 06, 2019 7:05 am
by SBarnes
How can you get the price for a product for a specific debtor similar to the pricing scheme object but using SQL, what I am needing to do is produce every pricing combination and dump it to an external list.

Re: Pricing in SQL

PostPosted: Fri Dec 06, 2019 8:18 am
by Scott.Pearce
There is a stored procedure called "usp_JIWA_Price_GetPrice" that you can use.

That's potentially going to be a pretty big list considering pricing can vary by date.

Re: Pricing in SQL

PostPosted: Fri Dec 06, 2019 8:33 am
by SBarnes
Thanks Scott,

Actually it will always be at DateTime.Now but you are right it could still produce a lot of data for example it you have 1,000 customers and 3,000 products you obviously get 3,000,000 combinations.

There is no way any ERP such as Jiwa or others that implement complex pricing rules is going to be able to produce a list without doing some serious number crunching to get there because as you rightly pointed out most rules are date driven so what might be a price today could not be the price tomorrow and that's without any data in the database changing.