Selective sequence..
Selective sequence..
От:
"Timo Tuomi" <timo.tuomi@sllpilots.fi>
Дата:
Hello Gurus,
I would like to have a table 'members' with columns 'memberid' and
'member_role' implemented so that when I add a member it automatically
inserts a nextval('memberid') into the memberid field ONLY if
member_role='a_particular_role' otherwise 0.
I have a strong feeling that it's not too complicated at all, but I could
use a hint.
Thanks,
Timo
Re: Selective sequence..
От:
Vijay Deval <deval@giaspn01.vsnl.net.in>
Дата:
Hi Timo
will it work if you select maxval+1 of memberid column for certain
condition, otherwise 0?
Vijay
Timo Tuomi wrote:
> when I add a member it automatically
> inserts a nextval('memberid') into the memberid field ONLY if
> member_role='a_particular_role' otherwise 0.