{and t1.itemcode='h-1030'}
in the where clause and that works. it pulls up price changes for h-1030.
however, when i say
{and t1.itemcode='[%0]' '}
it doesnt work. why? how can i give the user the option of being able to enter the itemcode?
thanks
prem
hi
this could be a very simple thing but somehow not able to find out and was wondering if anyone could help. i found this query to list out the price changes and the date of change. however, i want to change this to give the user the option to enter the itemcode. how do i do that?
SELECT
T1.ItemCode,
T2.Price [Current Price],
T1.Price [Old Price],
T1.PriceList [Price List No.],
T3.ListName [Price List Name],
T1.Factor,
(Select T9.UpdateDate from AITM T9 where T9.Loginstanc = (T1.Loginstanc + 1) and (T9.Loginstanc =(T0.Loginstanc +1)) and T9.Itemcode =T1.Itemcode )[Update Date] /, T1.LogInstanc, (T1.Loginstanc + 1)[Loginstance + 1]/
FROM
AITM T0
INNER JOIN AIT1 T1 ON T0.ItemCode = T1.ItemCode and T1.Loginstanc =T0.loginstanc
INNER JOIN ITM1 T2 ON T1.ItemCode = T2.ItemCode and T2.PriceList = T1.PriceList
INNER JOIN OPLN T3 ON T1.PriceList = T3.ListNum
WHERE
T1.Loginstanc = ((Select top 1 T3.Loginstanc from ait1 T3 where T3.ItemCode =T1.ItemCode And T3.PriceList = T1.PriceList and T3.Loginstanc <> '1' order by T3.Loginstanc desc) - 1)