troubleshooting Question Access SQL Select an example of data in any column

Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft AccessVisual Basic.NET
3 Comments1 Solution905 ViewsLast Modified:

In my application that works with an Access database, I need to get a single example of data
for each column. What SQL statement would I use to get a single item of data that is not null
from any column?

For instance if I have a Text column called AccNumber I would want to get a single example of data eg "ACC123"

The following statement gets me a list, when I just need one of these items
SELECT ([AccNumber]) AS Expr1
FROM Transactions
WHERE [AccNumber] Is Not Null;
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros