From: | developer(at)wexwarez(dot)com |
---|---|
To: | "Richard Huxton" <dev(at)archonet(dot)com> |
Cc: | "Russell Smith" <mr-russ(at)pws(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: need help with plpgsql execute insert |
Date: | 2006-12-21 17:54:12 |
Message-ID: | 3019.192.168.1.235.1166723652.squirrel@mail.wexwarez.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> developer(at)wexwarez(dot)com wrote:
>>> I believe you are wrong. the EXECUTE is being given 11 columns, it
>>> expects 1. I think you need to form your execute query like;
>>>
>>> EXECUTE 'INSERT INTO payment (
>>> id,amount,accepted_date, company_id , date ,
>>> patient_responsible_party_id patient_contact_responsible_party_id ,
>>> insurer_network_responsible_party_id, type, status)
>>> values (' || quote_ident(paymentId) || ',' || ...
>>>
>>> Something of that fashion.
>
>> Thanks for replying. So the '%' symbol can not be used with an EXECUTE
>> 'INSERT statement. I thought this was exactly what it was for?
>
> No - the RAISE statement takes that format, nothing else.
>
> However, you only need the EXECUTE for statements that you need planned
> every time they are called, e.g. can have their table-name changed. You
> should just be able to write:
> INSERT INTO ... VALUES (paymentId, 0.0, data.create_date ...)
>
> P.S. - you can remove much of a message when you reply, that way people
> can quickly follow the new parts of a message-thread.
>
> --
> Richard Huxton
> Archonet Ltd
>
Thanks Richard that worked for me.
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2006-12-21 18:00:16 | Re: TSearch2 Changeset 25387 |
Previous Message | Hannes Dorbath | 2006-12-21 17:51:42 | Re: TSearch2 Changeset 25387 |