Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql Statement
Message
 
À
20/03/2000 13:26:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00347998
Message ID:
00348014
Vues:
28
Jeffrey,

If you are using SQL Server, then Stephen's solution will work. But, I don't believe that the Fox driver supports CASE in SQL statements. You can use a union, but remember that fields must be the same size, thus add SPACE(33) to the first errmsg so that it will be the same size as the second. There can only be one order by clause, and it must numerically refer to a column.


SELECT TEMPALIAS.*,
MF_158.DATE_IN AS IMPORTED,
'Record already imported.'+SPACE(33) AS Errmsg
FROM TEMPALIAS, MF_158
WHERE ALLT(TEMPALIAS.UNIQKEYSAS) = ALLT(MF_158.UNIQKEYSAS)
UNION
SELECT TEMPALIAS.*,
MF_158.DATE_IN AS IMPORTED,
'Records previously found as errors but have passed since.' AS Errmsg
FROM TEMPALIAS, PROB_158, MF_158
WHERE ALLT(TEMPALIAS.UNIQKEYSAS) = ALLT(PROB_158.UNIQKEYSAS)
INTO CURSOR INPR158
ORDER BY 1 ???


..., or something like that.

Hope this helps,

Phil
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform