Hi all, using access 2003/sql server 2008 I have an access front end linking to a sql back end. Now I need to put a condition to a query and having trouble where to begin. My table consist of 3fields: a list of salestickets, a three digit code and an amount. This table is an weekly excel import. The salesticket needs to be unique but there are times when the excel sheet would have duplicate salesticket numbers with different three digit codes Ex. '56789 DRE' and '56789 CRE'. The users wants to import the salesticket with the largest amount. I was thinking I could use an if statement but the problem is I would not know the largest amount at any given time. Ex. '56789 DRE 300' and '56789 CRE 400'. In this case; I would import the one with 400. This excel sheet can consist of more than 50000 rows so scrubing manually before the import is not an option especially since its automated. I also need the code to be sql server friendly. I started a query but it doesn't work:
Some guidance please. Thank youCode:Select distinct salesticket, coop, amount from tblSalesticket where max(amount)