This is a simple CNT on a field, it works fine on one table, but the same dont work on, on the other table. i dont know what is the problem. Anyones help is greatly appreciated.
here is the code sample :
TABLE FILE TABLE1 SUM CNT.FIELD1 END
This is returing the code for the SQL as follows:
SELECT COUNT(*) FROM table1 as T1;
i wanted the code to work like the below SQL Syntax:
SELECT COUNT(field1) FROM table1 as T1;
Thanks RekhaThis message has been edited. Last edited by: Kerry,
WebFocus 7.6.4 windows XP MS SQL 2000/2005
December 15, 2008, 04:18 PM
Waz
Have you searched the forum for other posts on this subject.
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 15, 2008, 05:08 PM
FrankDutch
very easy
TABLE FILE XYZ
COUNT field AS 'T1'
BY other field
END
But do follow the advices of search or follow the links from Francis....
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
December 16, 2008, 03:39 PM
Rekha
Thanks every one for your suggestion. I think i found the solution by myself. It is the database field design, if the field is "Not Null", then it will work like below:
SELECT COUNT(*) FROM table1 as T1;
if the field allows Nulls in the table then we can get the syntax like :