کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

لیست آخرین آیتم براساس گروبندی فیلد SupplierID



تمام برداشت ها از سایت های خارجی جهت آموزش شما دوستان مبتدی اخذشده،نایاب هستند لذا نهایت استفاده را ببرید.


We are looking to make changes



select * from products where productid in(

(select val(lastt) as lastt from (select distinct dlast('ProductId','products',"supplierId=" & [SupplierId]) as Lastt,supplierid from products

order by supplierid)))




w3schools/sql




ProductIDProductNameSupplierIDCategoryIDUnitPrice
3 Aniseed Syrup 1 2 12 - 550 ml bottles 10 
8 Northwoods Cranberry Sauce 3 2 12 - 12 oz jars 40 
12 Queso Manchego La Pastora 5 4 10 - 500 g pkgs. 38 
15 Genen Shouyu 6 2 24 - 250 ml bottles 15.5 
23 Tunnbröd 9 5 12 - 250 g pkgs. 9 
24 Guaraná Fantástica 10 1 12 - 355 ml cans 4.5 
27 Schoggi Schokolade 11 3 100 - 100 g pieces 43.9 
30 Nord-Ost Matjeshering 13 8 10 - 200 g glasses 25.89 
39 Chartreuse verte 18 1 750 cc per bottle 18 
41 Jack's New England Clam Chowder 19 8 12 - 12 oz cans 9.65 
44 Gula Malacca 20 2 20 - 2 kg bags 19.45 
46 Spegesild 21 



استفاده از عبارت Last 


select * from products where productid in(select lLast from (select distinct last([productId]) As lLast,supplierid from products group by supplierid order by supplierid))



Or 


select * from products where productid in(select distinct last([productId]) As lLast from products group by supplierid)



select * from products where productid in(select distinct last([productId])-1 As lLast from products group by supplierid)



select * from products where productid in(select distinct first([productId]) As ifirst from products group by supplierid)





first-and-lastfunction-in-ms-access