Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Can I Get This Converted To SQL Select ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00110044
Message ID:
00110055
Vues:
58
>
>I've tried with no success.
>
>TIA
>Jeff

April Fool! Right? In June? *Where did you get/What the hell generated* that statement?

First get rid of all the duplicate SELECTs.

SELECT T1.SLCSTN,T2.SHSLNM,T2.SHSLA1,T2.SHSLA2,
T2.SHSLA3,T2.SHSLCI,T2.SHSLST,T2.SHSLZP,
T1.SLONO ,T2.SHRLNO,T1.SLPTNO,T1.SLPTD1,
T2.SHCSPO,T1.SLORQY,T1.SLSHQO,T1.SLSHQS,
T2.SHORCL,T1.SLUNPR,T1.SLLNST,T1.SLEXPR,
T1.SLRQDT,T1.SLPRDT,T2.SHORDT,T2.SHALBO,
T3.WBBLT1,T3.WBBLT4,T3.WBBOSQ,T3.WBRSOQ,
T1.SLUNPO,T1.SLRLNO,
T1.SLUNQY,T2.SHSHNM,T2.SHHLDC,T2.SHSTCN,
T4.SLMONO,T5.HSTDT,T5.HDUEDT,T5.HCLSDT,
T6.ACBAC,T1.SLLNNO
FROM AADAT80!OP100M2 T1,AADAT80!OP100M1 T2,AADAT80!IC140M T3,
AADAT80!EC200M T4,AADAT80!IC100M T5,AADAT80!DE100M T6
WHERE T1.SLONO=T2.SHONO and T1.SLRLNO=T2.SHRLNO and
T1.SLWHS=T3.WBWHNO AND T1.SLPTNO = T3.WBPPN and
T1.SLONO=T4.SPONO and T1.SLRLNO=T4.SPRLNO and
T1.SLLNNO=T4.SPLNNO and T4.SLMONO=T5.HZORNO and
T1.SLPTNO=T6.IZPN and
T1.SLLNST <> 'C' and T6.PMPLNT = 'GSO'
ORDER BY T1.SLPTNO, T1.SLPRDT, T1.SLONO, T1.SLRLNO

You have to alias the tables (T1, T2) to match the appropriate tables (I just guessed). I also assumed VFP Tables and DBC when I changed the db/alias to DB!Tablename.

Hopefully this gets you on right track.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform