2013/3/26 Pavel Stehule :
> Hello
>
> 2013/3/26 Ben Morrow :
>> Quoth pavel.steh...@gmail.com (Pavel Stehule):
>>> Dne 25.3.2013 23:51 "Ben Morrow" napsal(a):
>>> >
>>> > I would use a view for this:
>>> >
>>> > create view vale_any as
>>> > select 'P'::text "type", v.adiant, v.desc_per, v
Hello
2013/3/26 Ben Morrow :
> Quoth pavel.steh...@gmail.com (Pavel Stehule):
>> Dne 25.3.2013 23:51 "Ben Morrow" napsal(a):
>> >
>> > I would use a view for this:
>> >
>> > create view vale_any as
>> > select 'P'::text "type", v.adiant, v.desc_per, v.cod
>> > from valepag v
>> >
Quoth pavel.steh...@gmail.com (Pavel Stehule):
> Dne 25.3.2013 23:51 "Ben Morrow" napsal(a):
> >
> > I would use a view for this:
> >
> > create view vale_any as
> > select 'P'::text "type", v.adiant, v.desc_per, v.cod
> > from valepag v
> > union all
> > select 'R', v.adiant,
This design has a performance problem. You read both tables everywhere -
for large tables can be bad
Dne 25.3.2013 23:51 "Ben Morrow" napsal(a):
>
> Quoth c...@sygecom.com.br (Mauricio Cruz):
> >
> > I'm working in a PL/SQL and I'd like to use the same
> > PL for 2 kinds of tables...
> >
> > I hav
Quoth c...@sygecom.com.br (Mauricio Cruz):
>
> I'm working in a PL/SQL and I'd like to use the same
> PL for 2 kinds of tables...
>
> I have "valepag" and "valerec" both tables
> have the same columns, but one is for debit and the other one is for
> credit, the PL will work for both cases
>
>
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 select a.adiant,
>>a.de
Hello
> For rSql in select a.adiant,
>a.desc_per
> from case
> when cTip='P'
> then valapag
> else valerec
>end
> where cod=2 Loop
you can use a dynamic SQL, but
Hi everyone,
I'm working in a PL/SQL and I'd like to use the same
PL for 2 kinds of tables...
I have "valepag" and "valerec" both tables
have the same columns, but one is for debit and the other one is for
credit, the PL will work for both cases
with the unique diference for
the name of th