|
dynamic queiries: msg#00244db.postgresql.novice
Hi, A am trying to execute following query..: strSelectString := ''SELECT OBJID2 as strPersonnummer FROM '' || strRollentab || '' where qualitaet = ''|| QUALITAETNR ||'' AND OBJID2 = '' || NEW.ID || ''''; How do I go about it? I tried with normal execute, but no luck.. EXECUTE ''SELECT OBJID2 as strPersonnummer FROM '' || strRollentab || '' where qualitaet = ''|| quote_literal(referrer_keys.QUALITAETNR) ||'' AND OBJID2 = '' || NEW.ID || ''''; and i tried with For-in-execute, as stated in the docus, but no luck either. I receive an error message stating that the sql statement is missing something. FOR ROW IN EXECUTE strSelectString LOOP Raise NOTICE ''result: % '',strPersonnummer; END LOOP; How can I do this then?? Thanks!! Carla Correia This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Importing Postgres 7.1.1 DBs into Postgres 7.3.2: 00244, Tom Lane |
|---|---|
| Next by Date: | problem returning setof records: 00244, glenn |
| Previous by Thread: | Foriegn key to Union query or two tablesi: 00244, Phillip J. Allen |
| Next by Thread: | problem returning setof records: 00244, glenn |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |