Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long SQL statement
Message
From
24/09/2002 15:22:01
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, United States
 
 
To
16/09/2002 09:57:47
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00700779
Message ID:
00703944
Views:
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
Previous
Reply
Map
View

Click here to load this message in the networking platform