The keyword "AS" is not required in SQL standard. Therefore some database do not like 
it and generate error if it's inside the
query.
But you can change your table definition to include the "AS", e.g.:

<field name="sum_ledg_amt" expression="sum(ledg_amt) as"   fieldType="numeric"  
size="16"/>      

Cheers,
Henner


> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im 
> Auftrag von jitu
> Gesendet: Montag, 16. August 2004 09:11
> An: [EMAIL PROTECTED]
> Betreff: [dbforms] Query does not generate "AS" in the select 
> statement
> 
> 
> 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
> 




-------------------------------------------------------
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