How can I use DISTINCT in an SQL query in VBA? Please provide an example. Thanks!

    Requires Free Membership to View

I'm not sure what the limitation here that you're asking about is. DISTINCT simply limits the returned rows to avoid having duplicate entries. If you are sending a query to SQL Server from VBA, you can specify the DISTINCT modifier in a query the same way you would in a SQL query tool ie: SELECT DISTINCT SomeColumns FROM SomeTable

This was first published in December 2005

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.