Hi All,
I'm working on porting an Access 97 Database to SQL Server. The front end will still remain in Access but the data will be moving to SQL server. There's the background now I'm having a little problem understanding DISTINCTROW.
I know that in a select statement it gives me ROWS that are unique (correct me if i'm wrong here). But what exactly does it do if I have multiple tables and joins.
I see some queries like
DELETE DISTINCTROW Pet.PetId, TempPetdata.PetId, Pet.* FROM Pet LEFT JOIN TempPetdata ON Pet.PetId = TempPetdata.[clock#] WHERE (((TempPetdata.[clock#]) Is Not Null))
This seems to delete the join'ed rows from Pet table. I cant figure out why put the field names of the TempPetData in the Delete part at all? Any ideas?
Also, When Joins are used, in select, update or delete, does distinct row behave as a normal DISTINCT?
Thanx Solomons
Pet is a table with details of all the pets. TempPetData is just a temp table created of all the pets that are no longer sold.
I'm working on porting an Access 97 Database to SQL Server. The front end will still remain in Access but the data will be moving to SQL server. There's the background now I'm having a little problem understanding DISTINCTROW.
I know that in a select statement it gives me ROWS that are unique (correct me if i'm wrong here). But what exactly does it do if I have multiple tables and joins.
I see some queries like
DELETE DISTINCTROW Pet.PetId, TempPetdata.PetId, Pet.* FROM Pet LEFT JOIN TempPetdata ON Pet.PetId = TempPetdata.[clock#] WHERE (((TempPetdata.[clock#]) Is Not Null))
This seems to delete the join'ed rows from Pet table. I cant figure out why put the field names of the TempPetData in the Delete part at all? Any ideas?
Also, When Joins are used, in select, update or delete, does distinct row behave as a normal DISTINCT?
Thanx Solomons
Pet is a table with details of all the pets. TempPetData is just a temp table created of all the pets that are no longer sold.