Hi,

For a query using expression, the "select" statement does not include
the keyword "AS" when renaming output columns an this keyword is
required by postgresql. Is there a way of getting over this problem ?

Query:

<query name="q_accbal_per" from="accbal_per">   
<search name="accid" fieldType="char" size="16" />
 <field name="sum_ledg_amt" expression="sum(ledg_amt)"     
        fieldType="numeric"     size="16"/>     
 <field name="sum_tot_dr" expression="sum(tot_dr)"
         fieldType="numeric" size="16"/>        
 <field name="sum_tot_cr" expression="sum(tot_cr)"
         fieldType="numeric" size="16"/>        
</query>

The resulting select statement:

INFO  org.dbforms.config.Query  - doSelect:SELECT sum(ledg_amt)
sum_ledg_amt, sum(tot_dr) sum_tot_dr, sum(tot_cr) sum_tot_cr  FROM
accbal_per WHERE  (  (  ( accid =  ?  )  )  )  ORDER BY accid

The Syntax error due to missing "AS":
postgresql.util.PSQLException: ERROR: syntax error at or near
"sum_ledg_amt"


Regards,
Jitu



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to