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

Remove link for linked table in access
MSACCESS 2002 Linked Table Performance Really Slow
ms access 2010 update linked table with no primary key
Memo field value truncated to about 1000 characters when inserted from a .net typed dataset
Access (.MDB) deployment issue - Windows 7 - Installation with admin user?
MS Access 2007 popup form refuses to display/not accessible in design mode (but present in list of forms)
Count email type per customer id
Access Row Data to Columns Based Off ID
External Development and Testing of Microsoft Access VBA Code
Avoid busy wait in Access 2003
Extracting data from 60,000 Facebook ID's in less than 6 hours?
MS Access 2010: Linking to SharePoint list with Multiple Content Types -Read-Only
Save password for ODBC connection to MS SQL server from MS Access 2007
Average of a distinct count by day in Access
How to do calculation using many-to-many relationship in MS Access
What does a column with plus sign mean in this Access 2003 table?

Categories

HOME
vbscript
netsuite
keycloak
azure-data-factory
tizen
react-router
rsync
programming-languages
ravendb
networkx
mouse
applepay
offline
circular-dependency
decomposition
django-simple-history
google-static-maps
interop
xlsxwriter
errorlevel
intentfilter
google-search-api
restful-authentication
h2db
javacv
intel-pin
internet-explorer-9
uninstall
greendao
applozic
ping
replaceall
google-qpx-express-api
gtrendsr
noraui
usbserial
webtest
accelerate-framework
streamsets
sharefile
unobtrusive-validation
awt
hp-ux
ruby-on-rails-3.1
sql-server-agent
powershell-dsc
google-closure
firebase-admin
nand2tetris
arena-simulation
keydown
http-redirect
checkboxlist
gpx
qcombobox
filepicker
worksheet
integrity
qtwebview
linode
spring-cache
orthogonal
mediaelement
quartz-composer
nsfilemanager
holder.js
whois
fadeout
dataview
pyke
netmq
qdialog
feedback
libressl
browser-bugs
sframe
method-parameters
pretty-print
e10s
sorl-thumbnail
angularjs-ng-click
cctv
rdl
responsive-slides
article
tld
valuechangelistener
mysql-error-1062
datagridviewcolumn
page-layout
quantlib-swig
access-rights
dexterity
dbconnection
file-locking
http-unit
tinn-r
simba
tridion-worldserver
reddot
coredump
jmock
yslow
xsdobjectgen
dbal
defensive-programming

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