I am trying to select the first time I entered a field value in a 20000+ table. I wish to retain the other details such as date, location etc.
I have tried using the unique record method but that will not work for obvious reasons.
I am trying to select the first time I entered a field value in a 20000+ table. I wish to retain the other details such as date, location etc.
I have tried using the unique record method but that will not work for obvious reasons.
Don't understand. What are you trying to select and where
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
What determines 'first time'? A date or a sequence number?
SELECT TOP 1 location, etc FROM table ORDER BY [date] WHERE field="something";
Of course if there are multiple records with same date, will need other criteria to determine sort order. Maybe:
SELECT TOP 1 location, etc FROM table ORDER BY ID WHERE field="something";
Or maybe you want all "something":
SELECT table.* FROM table WHERE ID IN (SELECT TOP 1 ID FROM table as Dupe WHERE Dupe.field = table.field ORDER BY ID);
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Me neither. Suggest you define "earliest" as it's not as cut and dried as you might think.
Earliest date? Then that should be simple seeing as how you've said you have a date field.
"First" record based on some criteria? If there is no autonumber field, forget that. Even if there is, it's not 100% reliable, but would be very close.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.