I am trying to import a CSV file exported from Ebay into MS Access.
Ebay cram into one file what should be in two files. So if someone purchases two products, Ebay puts the customer details in one row and the products bought in the following lines.
Customer cruze130613
bought two products, so has information spread over three lines!
What I would like to do is fill the empty User ID
column blanks.
So:
Set [User ID] equal same 'User ID' as where [Sales record number] = [Sales record number]
I think the select clause for [Sales record number]
should use DISTINCT
as is duplicated on >1 rows.
Any help with the SQL code will be appreciated.
2
Answers
Thank you Lee for your suggestion.
As far as I can see Ebay only export these pseudo CSV files.
I had another look today and managed to find a solution. I wonder which would be more efficient yours or mine?
Perhaps something along the lines of the following:
Change both references of
YourTable
to the name of your table.Here, the domain aggregate function
DLookup
is used to acquire the value of theUser ID
field for a record meeting the supplied criteria (in this case whereUser ID
is not null, and where thesales record number
is equal to that of the record being updated).There are other ways to achieve the same result, but
DLookup
is used here to retain the ‘updateability’ of the query in MS Access.