Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long SQL statement
Message
De
24/09/2002 15:22:03
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, États-Unis
 
 
À
16/09/2002 09:57:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00700779
Message ID:
00703945
Vues:
17
*-- Part 1: Select
lcSelect = "Select ap_g.ven_numb, ap_g.voc_numb, ap_g.voc_type, " +;
"ap_g.due_days, ap_g.dis_days, ap_g.trn_date " +;
"000000000.00 as ag4_totl, 000000000.00 as tot_bala " +;
"FROM ap_g " +;
"LEFT OUTER JOIN ap_a " +;
"ON (ap_g.ven_numb = ap_a.ven_numb) "

lcWhere = "WHERE 0=0 "

IF ThisForm.chkShow_Past_Periods.Value = 0
lcWhere = lcWhere + " AND ap_g.voc_stat <> 1 "
ENDIF


IF Thisform.opgRpt_Sort.Value = 1
lcOrderBy = " ORDER BY ap_a.ven_name, ap_g.voc_numb "
ELSE
lcOrderBy = " ORDER BY ap_g.ven_numb, ap_g.voc_numb "
ENDIF
lcOrderBy = " ORDER BY ap_g.ven_numb, ap_g.voc_numb "

lcSQL = lcSelect + lcWhere + lcOrderBy

PRIVATE lcFile
lcFILE = SYS(2015)
x=SQLEXEC(gnC, lcSQL, lcFile)

IF x< 0
set step on
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform