I have a database and a spreadsheet.
The spreadsheet contains a customer list. I need to make a report with other data.
This data comes from the database.
I have imported the spreadsheet into the database as a table.
I link the first and last name to eachother and run the new query.
I get various duplicates. The only other field I can think of linking is the purchase date. The only problem is that the purchase date is written as, 4/18/2006 in the spreadsheet, and the database has 3 different tables for the date, ex. date1=month, date2=day, date3=year.
Other than manually looking up each account, is there a way I can make my search easier?
Here is my code:
SELECT BSYDTAA_BADPLPP.[LPMRC#], Sheet1.LASTNAME, Sheet1.FIRSTNAME, Sheet1.DOB, BSYDTAA_BSYMQTPS.QTPSD, Sheet1.DOS
FROM (BSYDTAA_BADPLPP INNER JOIN Sheet1 ON (BSYDTAA_BADPLPP.LPPFNM = Sheet1.FIRSTNAME) AND (BSYDTAA_BADPLPP.LPPLNM = Sheet1.LASTNAME)) INNER JOIN BSYDTAA_BSYMQTPS ON (BSYDTAA_BADPLPP.LPPSRC = BSYDTAA_BSYMQTPS.QTKEY) AND (BSYDTAA_BADPLPP.[LPHSP#] = BSYDTAA_BSYMQTPS.[QTHSP#]);
The spreadsheet contains a customer list. I need to make a report with other data.
This data comes from the database.
I have imported the spreadsheet into the database as a table.
I link the first and last name to eachother and run the new query.
I get various duplicates. The only other field I can think of linking is the purchase date. The only problem is that the purchase date is written as, 4/18/2006 in the spreadsheet, and the database has 3 different tables for the date, ex. date1=month, date2=day, date3=year.
Other than manually looking up each account, is there a way I can make my search easier?
Here is my code:
SELECT BSYDTAA_BADPLPP.[LPMRC#], Sheet1.LASTNAME, Sheet1.FIRSTNAME, Sheet1.DOB, BSYDTAA_BSYMQTPS.QTPSD, Sheet1.DOS
FROM (BSYDTAA_BADPLPP INNER JOIN Sheet1 ON (BSYDTAA_BADPLPP.LPPFNM = Sheet1.FIRSTNAME) AND (BSYDTAA_BADPLPP.LPPLNM = Sheet1.LASTNAME)) INNER JOIN BSYDTAA_BSYMQTPS ON (BSYDTAA_BADPLPP.LPPSRC = BSYDTAA_BSYMQTPS.QTKEY) AND (BSYDTAA_BADPLPP.[LPHSP#] = BSYDTAA_BSYMQTPS.[QTHSP#]);