本文介绍了如何使用Customer_Key遍历Customer_Level_Id的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

客户表



promotion_id customer_name cust_level_id customer_key

40286143 0000010966 - SPAR SOUTH RAND 53 5536

40287023 0000120004 - Pick'n Pay超市54 1719

40290119 0000120052 - 选择大型超市55 1699

40287672 0000140011 - Spar Lowveld DC 56 3958

hrycy_customer table



customer_key customer_parent_key

5536 1710

1719 1745

1699 3941

3958 4090

7 3656





如果cust_level_id为54则如果cust_level_id为55,则必须获取customer_key的customer_parent_key

然后我们必须在54 l中找到customer_parent_key avelfrom然后找到53级别的customer_paren_key。

如果cust_level_id是55然后遍历55和54级别然后从53级获得相应的Customer_parent_key。

customer table

promotion_id customer_name cust_level_id customer_key
402861430000010966 - SPAR SOUTH RAND 53 5536
402870230000120004 - Pick 'n Pay Supermarkets54 1719
402901190000120052 - Pick 'n Pay Hypermarkets55 1699
402876720000140011 - Spar Lowveld DC 56 3958
hrycy_customer table

customer_key customer_parent_key
5536 1710
1719 1745
1699 3941
3958 4090
7 3656


if cust_level_id is 54 then it will have to get the customer_parent_key of customer_key
if cust_level_id is 55 then we he have to find customer_parent_key in 54 lavelfrom then for that find customer_paren_key in 53 level.
if cust_level_id is 55 then traverse through 55 and 54 level then get corresponding Customer_parent_key from 53 level.

推荐答案

这篇关于如何使用Customer_Key遍历Customer_Level_Id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 09:53