[SQL] execute

2013-04-25 Thread Mauricio Cruz
array[rCad.cmp,rSql.codfor] ^ I guess I should not use "execute" besides of insert, update, delete ... but how could I do in this case ? Thanks every one. -- Grato, Mauricio Cruz Sygecom Informática [1] 51 3442-3975 / 3442-2345 Links: -- [1] http://www.sygecom.com.br

Re: [SQL] From with case

2013-03-25 Thread Mauricio Cruz
Thanks very much Pavel, the dynamic SQL ideia has work perfect in my case. Thanks so much. -- Grato, Mauricio Cruz Sygecom Informática 51 3442-3975 / 3442-2345 On Mon, 25 Mar 2013 15:01:09 +0100, Pavel Stehule wrote: > Hello > > >> For rSql in

[SQL] From with case

2013-03-25 Thread Mauricio Cruz
ique diference for the name of the table... So I thought to use something like this: ... For rSql in select a.adiant, a.desc_per from case when cTip='P' then valapag else valerec end where cod=2 Loop ... But it just dont work... does some one have other solution for this cas