cancel
Showing results for 
Search instead for 
Did you mean: 

Help on query

former_member522789
Participant
0 Kudos

Hello experts

One question for a query I am having problems

My company makes dscount group based on item properties, so different property fidderent discount.now I need to have a table showing all pricing per customer

I have tried to start the query but I really need support I believe the Object key number is equal to the item property number

SELECT

CASE T2.[ItemCode], T3.[ItemName], T2.[Price], T4.[Discount] when T3.[QryGroup1]='Y' AND T4.[ObjKey]=1 FROM OCRD T0 INNER JOIN OPLN T1 ON T0.ListNum = T1.ListNum INNER JOIN ITM1 T2 ON T1.ListNum = T2.PriceList INNER JOIN OITM T3 ON T2.ItemCode = T3.ItemCode INNER JOIN OSPG T4 ON T0.CardCode = T4.CardCode WHERE T0.[CardCode] =[%0] END

CASE T2.[ItemCode], T3.[ItemName], T2.[Price], T4.[Discount] when T3.[QryGroup2]='Y' AND T4.[ObjKey]=2 FROM OCRD T0 INNER JOIN OPLN T1 ON T0.ListNum = T1.ListNum INNER JOIN ITM1 T2 ON T1.ListNum = T2.PriceList INNER JOIN OITM T3 ON T2.ItemCode = T3.ItemCode INNER JOIN OSPG T4 ON T0.CardCode = T4.CardCode WHERE T0.[CardCode] =[%0] END

Accepted Solutions (1)

Accepted Solutions (1)

former_member206488
Active Contributor
0 Kudos

Dear,

it is not possible to link item property table with any other table.

Thanks,

neetu

former_member522789
Participant
0 Kudos

ObjtKey is my guess but it seems that the number of object key is equal to the number of propertie

There must be a solution to edit a pric list based on discount group which are based on item properties

Former Member
0 Kudos

We don't have the same data to test. You need to make sure the link is real before anything else.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

How did you find out Item properties are equal to Object key?

Thanks,

Gordon