Apr 29, 2004 #1 H1004 MIS Oct 28, 2003 136 US In SQL, I can use GROUP BY Work Code and it would give me a list of all the work codes within that table. Is there a same functionality in WebFocus
In SQL, I can use GROUP BY Work Code and it would give me a list of all the work codes within that table. Is there a same functionality in WebFocus
Apr 29, 2004 #2 craigiep Programmer Oct 22, 2002 47 AU TABLE FILE WORK_CODE BY WORK_CODE END will give a list of codes. Basically a SUM / MAX / COUNT etc is created on the fly, so if you look at the generated sql it will look something like this SELECT T1."WORK_CODE", MAX(T1."WORK_CODE") FROM WORK_CODE T1 GROUP BY T1."WORK_CODE" ORDER BY T1."WORK_CODE"; In some circumstances this might not be very efficient and you may want to code your own SUM x NOPRINT instead. Upvote 0 Downvote
TABLE FILE WORK_CODE BY WORK_CODE END will give a list of codes. Basically a SUM / MAX / COUNT etc is created on the fly, so if you look at the generated sql it will look something like this SELECT T1."WORK_CODE", MAX(T1."WORK_CODE") FROM WORK_CODE T1 GROUP BY T1."WORK_CODE" ORDER BY T1."WORK_CODE"; In some circumstances this might not be very efficient and you may want to code your own SUM x NOPRINT instead.
Jun 6, 2004 #3 PranasH Programmer Jun 4, 2004 7 LT Try using SQL Passtrought: SET SQLENG=<Engine Name> SQL ... END Upvote 0 Downvote
Jun 10, 2004 #4 gizzy17 Vendor Nov 6, 2003 141 US If your going to a sql database, I would think that you would want to use SELECT DISTINCT WORK_CODE..... The focus code for this would be TABLE FILE ... PRINT DST.WORK_CODE END Upvote 0 Downvote
If your going to a sql database, I would think that you would want to use SELECT DISTINCT WORK_CODE..... The focus code for this would be TABLE FILE ... PRINT DST.WORK_CODE END