JustAGuy
01-14-2004, 01:45 PM
Hello,
I am writing a conversion tool to convert DBF files (FoxPro) for SQL-Server, but I bumped with a barrier that I cannot overtake by myself, so I am asking for some help.
The problem is that when I SELECT the database, I get a lot of duplicated records (the file has no primary key, then the duplication is in the identifier field too - don't ask me how it can work, because I don't know!).
If I use SELECT DISTINCT I can discard the identical records, but still this way, some duplications remains, when the records are not exactly the same.
For instances, supose I have:
001 Cadillac
001 Cadillac
001 cadilac
001 Cadillac
The second and the fourth entries will be discarded by the SELECT DISTINCT, but the third will remain.
What I would like to do is to select, using as criteria just the first column. In the case above, I would like that just the first 001 record would be accepted and ALL others would be discarded, don't matter what's there.
There is a way to do that?
Thanks!
I am writing a conversion tool to convert DBF files (FoxPro) for SQL-Server, but I bumped with a barrier that I cannot overtake by myself, so I am asking for some help.
The problem is that when I SELECT the database, I get a lot of duplicated records (the file has no primary key, then the duplication is in the identifier field too - don't ask me how it can work, because I don't know!).
If I use SELECT DISTINCT I can discard the identical records, but still this way, some duplications remains, when the records are not exactly the same.
For instances, supose I have:
001 Cadillac
001 Cadillac
001 cadilac
001 Cadillac
The second and the fourth entries will be discarded by the SELECT DISTINCT, but the third will remain.
What I would like to do is to select, using as criteria just the first column. In the case above, I would like that just the first 001 record would be accepted and ALL others would be discarded, don't matter what's there.
There is a way to do that?
Thanks!