Information générale
Catégorie:
Codage, syntaxe et commandes
>I execute the following sql statement to create a table of unique customer id's from a large table:
>----------------------------------------------------------------
>SELECT DISTINCT CUSTID AS ID,;
>' ' AS FileName,;
>.F. AS Success, ;
>' ' AS ErrorMsg ;
>FROM DataDBF ORDER BY ID
>INTO DBF customer.DBF
>-----------------------------------------------------------------
>This sql statement has been used for a year and no problems have ever occurred, yesterday ended all that....I received 3 duplicate
>records in a row:
>
>ID FileName Success ErroMsg
>ID2320 .F.
>ID2320 .F.
>ID2320 .F.
>
>What is wrong with my sql statement ? I think maybe the other fields that I am creating at the same time are causing this. Should they be removed, I could use a SELECT DISTINCT ID....and then use an ALTER TABLE to add my other fields. ALSO I have been unable to recreate this behavior, but I can swear that it happend ( to my companies largest client, who received the same data three times and called everyone where I work to complain ! )
Did you try reindexing?
PS. Though it has nothing to do, I would suggest using SPACE(xxx) instead of strings of spaces.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement