I have four table sa, at, ar, lv,
Sa table consist
|Name|
|s1|
|s2|
|s3|
at table consist
|Name|
|t1|
|t2|
|t3|
ar table consist
|Name|
|r1|
|r2|
|r3|
lv table consust
|Name|
|l1|
|l2|
|l3|
Now I have 2 tables pf, pfs
pf table consist
|sa| at| ar| lv
|s1| t1| r1| l1|
Now if pf table has any value 'All' then it will update all combination of others table data into pfs
like sa has 'All'
|sa| at| ar| lv|
|All| t1| r1| l1
Then pfs table should have
|sa| at |ar| lv|
|s1| t1| r1| l1|
|s2| t1 | r1| l1|
|s3| t1| r1| l1|
in this way if pf consist sa = 'All' and at = 'All' then all combination of s1,s2,s3 and t1,t2,t3 into pfs
Can you please advise me how can I do it more elegant way?
I know I need to write a trigger on pf .
Any hep will really be appreciable.