ms-access


Mark Duplicate in Access


I would like to write a query in Access 2013 to mark the first time a word appears as "Yes" and all subsequent times as "No". I have included a sample below. The "Distinct" column is what I would like my query to generate.
Thank you
Word Distinct
First Yes
Second Yes
First No
Third Yes
Here is one approach:
SELECT *, IIf(DMin("ID","Table1","[Word]='" & [Word] & "'")=[ID],"Yes","No") AS FirstWord
FROM Table1;
Another:
SELECT *, IIf([ID] = (SELECT TOP 1 ID FROM Table1 AS Dupe WHERE Dupe.Word = Table1.Word ORDER BY Dupe.Word, Dupe.ID), "Yes", "No") AS FirstWord FROM Table1;
DISTINCT is a reserved word so I am avoiding using it as a field name.

Related Links

Missing ACCDB database drivers
MS Access Form button that allows user to browse/choose file, then imports file to a table
Can codesmith generator work with MS Access provider?
Access file unable to run in x64
Form.Seltop not selecting top most record
I have an ADO recordset, now I want to create a table from it but not at its connection location. How?
weighted average caluculation in access table
inputting info from one text box to another with command button
Sending attachments using access vba
Removing certain strings in an Access 2010 query
MS Access - Hide Columns on Subform
How to fix in oracle sql developer server new connection acces tab missing?
Invalid Syntax using DLookUp
How can I make a form to open by pressing a key combination in Ms Access 2010?
MS Access parameter: enter multiple values or leave blank to return all records
How to loop through all subforms MS Access VBA

Categories

HOME
ibm-bluemix
testing
yii2
testng
openmp
tizen
session
fme
cplex
baqend
cross-browser
pivotal-cloud-foundry
uber-api
android-youtube-api
maude-system
volttron
kentor-authservices
gz
static-libraries
orchardcms
opentracing
pugjs
object-detection
one-hot-encoding
opencover
tokenize
dcevm
bootstrap-tour
selectedindexchanged
chromebook
libuv
binary-data
key-value-observing
oracle-fusion-middleware
noraui
azure-sql-database
xmlreader
amazon-kinesis-kpl
bitbucket-pipelines
mixture-model
service-discovery
sharefile
lumberjack
optix
botbuilder
firebase-admin
fakeiteasy
arena-simulation
flashair
wptoolkit
fault
jquery-nestable
hendrix
darcs
setter
csound
sqlclient
ifs
mako
mediaelement
medium.com
google-feed-api
libpng
android-textview
xml-attribute
moveit
prettytensor
testng-dataprovider
revolution-r
two-factor-authentication
netmq
historian
srand
jms2
intel-fortran
metaclass
python-3.2
riak-cs
tableau-online
microbenchmark
sortedlist
bridge.net
article
flexmojos
django-nonrel
dmoz
funscript
gdata-api
tridion-worldserver
errai
windows-phone-7.1.1
enter
gnustep
krl
paster
perfect-hash
data-driven
xetex
boost-smart-ptr
defensive-programming
commodore

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App