Hi Experts,
Very new in the forum and SAPB1 in general and very week in SQL queries. I have the below query
SELECT T0.[ItemCode], T1.[ItemName],T0.[U_PKGS],T0.[U_InvNo], T0.[U_File_Number],T0.[LotNumber] AS Garden,T0.[U_Sale_Number],T0.[CreateDate],T0.[U_GROSSWT], T0.[U_Net_Weight], T0.[U_TareWT] FROM OBTN T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode where LEFT(T0.Itemcode,2)='T1' and T0.[LotNumber]=[%0]
and I need all records where the field U_Sale_Number is null to be part of the query, I have tried the empty space("") but its not working.
I also want an int variable declared to cater for number of days between the T0.[CreateDate] field and the current date or system date, I know you can use a DATEDIFF function to get the number of days between the 2 dates but I don't know how to go about it. Kindly assist.
Patrick.