Thank you for your help.
Code Sample
lcSql=''
lcSql = lcSql + ' SELECT sitename , siteday, progstats.season, '
lcSql = lcSql + ' COUNT(DATE) AS nights_open, '
lcSql = lcSql + ' IIF(EMPTY(siteinfo.deactivated),.T.,.F.) AS
ActiveStatus, '
lcSql = lcSql + ' SUM(fed) AS sum_fed, SUM(sleep) AS sum_sleep,'
lcSql = lcSql + ' SUM(men) AS sum_men,SUM(women) AS sum_women,
SUM(youth) AS sum_youth, '
lcSql = lcSql + ' siteinfo.siteid, siteinfo.deactivated '
lcSql = lcSql + ' FROM progstats INNER JOIN siteinfo '
lcSql = lcSql + ' ON progstats.sitekey=siteinfo.siteid '
lcSql = lcSql + ' GROUP BY sitename, siteday, season, siteid,
deactivated '
lcSql = lcSql + ' ORDER BY sitename, season '
lcSql = lcSql + ' INTO CURSOR sums '
TRY
&lcSql
CATCH
=MESSAGEBOX("Error in SQL",16,"CANNOT PROCEED")
=STRTOFILE(lcSql,'Errors.txt',0)
ENDTRY
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.