[Zope-dev] Problem in Fetching values from the ZSQL method

2010-05-19 Thread joseph_ig
Hi all, I have written a ZSQL method named ('getSummaryValue') for fetching the summary result from a table. Please see the following query. SELECT SecID ,SUM(CASE WHEN txnType IN('pi') THEN quantity ELSE 0 END) AS InitPos ,SUM(CASE WHEN txnType IN('pe') THEN quantity ELSE 0 END) AS EndPos

Re: [Zope-dev] Problem in Fetching values from the ZSQL method

2010-05-19 Thread Charlie Clark
Am 19.05.2010, 09:48 Uhr, schrieb joseph_ig gladiato...@gmail.com: Hi all, Hiya Joseph, zope-db is a better list for this discussion. I have written a ZSQL method named ('getSummaryValue') for fetching the summary result from a table. Please see the following query. SELECT SecID

Re: [Zope-dev] Problem in Fetching values from the ZSQL method

2010-05-19 Thread joseph_ig
Hi Charlie, Let me thank you first for the help. SELECT SecID ,SUM(CASE WHEN txnType IN('pi') THEN quantity ELSE 0 END) AS InitPos ,SUM(CASE WHEN txnType IN('pe') THEN quantity ELSE 0 END) AS EndPos FROM Txntemp WHERE Txntemp.fileImportID = dtml-sqlvar seqID type=int GROUP BY SecID Could