بتاريخ: 12 سبتمبر 201015 سنة comment_199916 Show the details of sales orders which are paid more than 14 days after the date of the sales order.SQL: SELECT SO.OrderID, D.DistributorID, D.FirstName, D.SurName, SO.OrderDate, P.PaymentDate, P.PaymentAmount FROM SalesOrder AS SO, Distributor AS D, Payment AS P WHERE D.DistributorID=SO.DistributorID AND SO.OrderID=P.OrderID AND DateDiff('yyyy',PaymentDate,Date( ) ) - DateDiff('yyyy',OrderDate,Date( )) <=14; WHEN I RUN THIS QUERY IT RETURN ALL THE VLAUES OF ORDER..BUT I WANT TO RETURN THE ORDERS WHICH IS PAID AFTER 14 DAYS OR MORE ?AND I TIRED THIS TOO (date()-P.PaymentDate)>=14; BUT IT DIDNT WORK :-(ANY SUGGESTIONS ?PLSthis is in microsft access تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.