../images/Emo26.gifנצל"ש בענייני תאריכים וSQL
השאילתה הזאת אמורה להראות לי את כל המידע שבין התאריכים שמצויינים בה כולל אבל היא מראה רק כשזה לא כולל קרי: אם אני מכניס את התאריך של היום היא לא מראה נתונים שיוצרו היום (ה27) אלא רק מאתמול ואחורה, למרות שהשתמשתי בסימן >= שזה אמור להראות גם את התאריך הנוכחי הנה השאילה אם למישהו יש רעיון
SELECT SuppliersOrderProducts.SOPorderId, SuppliersOrderProducts.SOPsupplierID, Suppliers.SupplierName, SuppliersOrderProducts.SOPproductNameHeb, SuppliersOrderProducts.SOPproductId, SuppliersOrderProducts.SOPproductPrice, SuppliersOrderProducts.SOPqty, customers.custId, SuppliersOrderProducts.SOPshippingPrice, SuppliersOrderProducts.SOPproductCostPrice, (SuppliersOrderProducts.SOPproductPrice*SuppliersOrderProducts.SOPqty) AS TotalProductPrice, (SuppliersOrderProducts.SOPproductCostPrice*SuppliersOrderProducts.SOPqty) AS TotalProductCostPrice, (customers.lname+' '+customers.fname) AS FullName,SuppliersOrderProducts.SentDate FROM (SuppliersOrderProducts INNER JOIN Suppliers ON SuppliersOrderProducts.SOPsupplierID = Suppliers.SupplierID) LEFT JOIN (orders LEFT JOIN customers ON orders.custId = customers.custId) ON SuppliersOrderProducts.SOPorderId = orders.orderid GROUP BY SuppliersOrderProducts.SOPorderId, SuppliersOrderProducts.SOPsupplierID, Suppliers.SupplierName, SuppliersOrderProducts.SOPproductNameHeb, SuppliersOrderProducts.SOPproductId, SuppliersOrderProducts.SOPproductPrice, SuppliersOrderProducts.SOPqty, customers.custId, SuppliersOrderProducts.SOPshippingPrice, SuppliersOrderProducts.SOPproductCostPrice, SuppliersOrderProducts.SentDate, customers.fname, customers.lname HAVING (((SuppliersOrderProducts.SOPsupplierID)=0) AND ((SuppliersOrderProducts.SentDate)<=#27/11/2007# And (SuppliersOrderProducts.SentDate)>=#23/11/2007#));