תאריכים, אקסס

Red Ninja

New member
תאריכים, אקסס

יש לי טבלה שמכילה שם של אירוע ותאריך, איך אני יכול לשלוף רק את האירועים שהתאריך שלהם לא עבר? ניסיתי משהו בסגנון where field > currentDate אבל זה לא מסתדר המסד כאמור הוא אקסס. תודה.
 

Tbear

New member
../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#));​
 

זהר פלד

New member
הנה רעיון:

התאריך נשמר במסד הנתונים עם שעה, גם אם לא הכנסת אותה בעצמך. תשתמש ב dateDiff של יום במקום בהשוואה ישירה, זה אמור לפתור לך את הבעיה.
 
למעלה