Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT help with a UNION???
Message
De
02/11/1999 22:09:40
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SELECT help with a UNION???
Divers
Thread ID:
00285908
Message ID:
00285908
Vues:
51
Well,

I HAD a complex SELECT with a UNION but it gave me an error - I performed a HACKUP job on my SELECT statements and got down to these 2 fields in each select. Can
someone tell me WHY I am still getting a UNION incompatible error? What am I doing wrong!!!!!

Thanks


Select ;
sum(iif(code.codetype="Time" and log.logdate iif((code.codetype="Expense" or code.codetype="WIP")
and ;
log.logdate iif(code.codetype=="Billings" and ;
log.logdate 0.00 as logamt ;
from Timepro!log left join timepro!code on log.codeid=code.codeid ;
where log.firmid=gFirmid and log.logdate<=gEnddate and log.clientid<>0 ;
UNION ALL ;
Select ;
0.00 as begbal, ;
iif(code.codetype="Time" or code.codetype="Administrative",log.time*log.rate, ;
iif (code.codetype=="Billings",log.rate*-1,log.rate)) as logamt ;
from timepro!log left join timepro!code on log.codeid=code.codeid ;
where (log.firmid=gFirmid and log.clientid<>0 and ;
log.logdate>=gStartDate and log.logdate<=gEnddate) ;
into cursor curswip ;
order by 1 && clientid & codenum
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform