Re: [SQL] how to perform minus (-) operation in a dynamic query

2008-07-14 Thread Anoop G
Hai all, Thanks to all , I got the answer, actualy I am write the function in openoffice.org and paste it to a .sql file that is the reason for the error. thanks Anoop On Mon, Jul 14, 2008 at 7:32 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Anoop G" <[EMAIL PROTECTED]> writes: > > ERRO

Re: [SQL] how to perform minus (-) operation in a dynamic query

2008-07-14 Thread Tom Lane
"Anoop G" <[EMAIL PROTECTED]> writes: > ERROR: syntax error at or near "\226" at character 18 > QUERY: SELECT mf,sf,(mf \226 mf * comm /100) \226 (sf \226 sf * comm/100) as > flt_claim > CONTEXT: PL/pgSQL function "test_perc" line 7 at for over execute statement > LINE 1: SELECT mf,sf,(mf \226 m

Re: [SQL] how to perform minus (-) operation in a dynamic query

2008-07-14 Thread Markus Wanner
Hi, Anoop G wrote: vchr_query:= 'SELECT mf,sf,(mf – mf * comm /100) – (sf – sf * comm/100) as flt_claim'; Simply use a real minus sign '-', and not a hyphen '–'. (Try copy'n'pasting from this email, if nothing else works ;-) ) Regards Markus -- Sent via pgsql-sql mailing list (pgsql-sql@

Re: [SQL] how to perform minus (-) operation in a dynamic query

2008-07-13 Thread A. Kretschmer
am Mon, dem 14.07.2008, um 11:21:17 +0530 mailte Anoop G folgendes: > SELECT mf,sf,(mf mf * comm /100) (sf sf * comm/100) as flt_claim; ^^^ ^^^ ^^^ That's not valid SQL. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (m

[SQL] how to perform minus (-) operation in a dynamic query

2008-07-13 Thread Anoop G
Hai all, I am new to plpgsql ,I have a table structure: Column | Type | Modifiers +--+--- mf | double precision | sf | double precision | comm | integer | I create a the following funtion create or replace function test_perc(