Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql Statement
Message
 
To
20/03/2000 13:26:08
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00347998
Message ID:
00348375
Views:
20
>Can anyone tell me how I can perform these two sql statements into one and resulting in one table?
>
>SELECT TEMPALIAS.*, MF_158.DATE_IN AS IMPORTED, 'Record already imported.' AS Errmsg ;
> FROM TEMPALIAS, MF_158 ;
> WHERE ALLT(TEMPALIAS.UNIQKEYSAS) = ALLT(MF_158.UNIQKEYSAS) ;
> INTO CURSOR INMF158 ;
> ORDER BY TEMPALIAS.UNIQKEYSAS
>
>m.inmfcnt = _TALLY
>
>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 TEMPALIAS.UNIQKEYSAS
>
>
>TIA
>
>Jeff T.


SELECT TEMPALIAS.*, MF_158.DATE_IN AS IMPORTED, ;
iif( ALLT(TEMPALIAS.UNIQKEYSAS)=ALLT(PROG_158.UNIQKEYSAS) ,;
'Records previously found as errors but have passes Since.',;
'Record already imported.' ) AS Errmsg ;
FROM TEMPALIAS, PROB_158, MF_158 ;
INTO CURSOR FINAL ;
ORDER BY TEMPALIAS.UNIQKEYSAS


__Stephen

Granted the CASE for SQL would be better!
Previous
Reply
Map
View

Click here to load this message in the networking platform