现在有一个字段,IND_NM。
prd_id IND_NM
100120 Wholesale/Retail Distrib
100121 Mfg & Distr. Indus.
... ...
现在想处理成
prd_id IND_NM IND_NM_GROUP1 IND_NM_GROUP2 IND_NM_GROUP3
100120 Wholesale/Retail Distrib 1 0 0
... ...... ... ....... .......
想满足下面的要求,这么做啊?
#IF IND_NM IN ('Wholesale/Retail Distrib', 'Comm,Media&Entertainment', 'Mfg & Distr. Indus.') THEN IND_NM_GROUP1 = 1 ; ELSE IND_NM_GROUP1 = 0 ;
#IF IND_NM IN ('Hospitality-Hotel', 'Other Industries', 'Telecom', 'Durable Manufacture', 'Provincial Government','Transport/Communic/Utilit', 'General, Business Service', 'Education', 'SQ-Education/Government') THEN IND_NM_GROUP2 = 1 ; ELSE IND_NM_GROUP2 = 0 ;
#IF IND_NM IN ('SQ-Unknown', 'Entertainment', 'Public Sector', 'SQ Platinum', 'SQ-Mercury', 'SQ-Mars', 'Food Services', 'ESS Country Speedway Appr', 'Mining & Construction', 'Automotive', 'Health/Education/Research', 'Health Care Public','Enterprise Business', 'Pricing Analytics', 'Government, State & Local', 'Agriculture', 'Finance/Insurance/Banking', 'Colleges/Universities', 'Legal') THEN IND_NM_GROUP3 = 1 ; ELSE IND_NM_GROUP3 = 0 ;
谢谢各位了。


雷达卡




京公网安备 11010802022788号







