REPORTFORM;GL1.frf
TITLE;รายละเอียดผังบัญชี 
SQL;DROP TABLE IF EXISTS _XGL&
SQL;
SQL;CREATE TABLE _XGL
SQL;select glmst.GLID, glmst.GLDESC , 
SQL;glmst.GLGROUP, glgroup.glgroupdesc,
SQL;00.00 AS XGL,RIGHT(glmst.GLGROUP,2) AS XGL1,
SQL;glmst.CASHSTAT
SQL;from glmst left join glgroup on glmst.GLGROUP = glgroup.glgroup
SQL;where glmst.GLID >= :m11 and glmst.GLID <= :m12
SQL;order by  glmst.GLID,glmst.GLGROUP&
SQL;
SQL;UPDATE _XGL SET XGL = 1 WHERE LEFT(GLGROUP,1) = "A"&
SQL;UPDATE _XGL SET XGL = 2 WHERE LEFT(GLGROUP,1) = "L"&
SQL;UPDATE _XGL SET XGL = 3 WHERE LEFT(GLGROUP,1) = "O"&
SQL;UPDATE _XGL SET XGL = 4 WHERE LEFT(GLGROUP,1) = "R"&
SQL;UPDATE _XGL SET XGL = 5 WHERE LEFT(GLGROUP,1) = "E"&
SQL;
SQL;SELECT * FROM _XGL
SQL;ORDER BY XGL,XGL1,GLID
CONDITION;ตั้งแต่รหัสผังบัญชี ~GLMST.GLID~Chr~2~SELECT GLID FROM GLMST ~GL
USECROSSTAB;N
CROSSTABFRF;N
CROSSTABHEAD;
CROSSTABFIELD;
