Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DISTINCTROW Question 1

Status
Not open for further replies.

MelissaKT

Technical User
Jun 22, 2004
95
US
I'm not sure if I'm posting in the correct forum, if I'm not, I'm really sorry. I'm currently in the process of migrating my Access database into SQL. I'm using the upsize wizard to do this. The upsize wizard had a problem with my queries due to a DISTINCTROW statement. I understand that DISTINCTROW isn't supported by SQL but I'm not sure what I should use instead? Should I use a GROUP BY statement? A DISTINCT statement? I would appreciate any help!!
 
Thank you! I thought that DISTINCT looked for a specific field (column? I'm having quite a time with SQL language!)? And that DISTINCTROW looked for a specific record? Do I need to rewrite my queries?
 
No need to rewrite the queries...DISTICT in SQL Server works exactly the same as DISTINCTROW in Access...

-DNG
 
DISTINCT in SQL Server works exactly the same as DISTINCTROW in Access...
Really ?
 
The database that I'm upsizing was originally built in Access 97. It was upgraded to Access 2000 about a year ago. When I go into the SQL view of the Query, I see no reason why distinctrow is even there! Is this something that Access 97 did as a default?
 
The DISTINCTROW predicate in JetSQL has only meaning when you have a table in the FROM clause and no field from this table in the SELECT list.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
That's interesting! I don't believe that definition applies to my queries (at least most of them). Actually, I just had a problem occur: Users were complaining that one of the forms was read only. It was based on one of the queries that I changed from Distinctrow to Distinct. I checked the query and each of the tables had at least one column in the query. I took DISTINCT out of the query and everything seems to be back to normal. I have to think that the distinctrow was a leftover from the Access 97 stuff. Thanks to everyone for their help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top