data_analysis:work:corp_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
data_analysis:work:corp_code [2020/03/04 02:23] – ↷ Links adapted because of a move operation prgramdata_analysis:work:corp_code [2025/07/07 14:12] (current) – external edit 127.0.0.1
Line 3: Line 3:
 {{tag>data_analysis B2B기업분석 R 분석}} {{tag>data_analysis B2B기업분석 R 분석}}
  
-[[data_analysis:work#사업자등록번호체계|사업자등록번호체계]]+[[data_analysis:work:b2b#사업자등록번호체계|사업자등록번호체계]]
  
 ===== R ===== ===== R =====
Line 30: Line 30:
   Reg2   Reg2
 } }
 +</code>
 +
 +
 +===== SQL =====
 +<code sql>
 +case
 +    when length([사업자번호]) <> 10 then 'ERR'
 + when [사업자번호] is null then 'ERR'
 + when substr([사업자번호],4,2) = '00' then 'ERR'
 +    when substr([사업자번호],4,2) <= '79' then '개인과세사업자'
 + when substr([사업자번호],4,2) >= '90' then '개인면세사업자'
 + when substr([사업자번호],4,2) in ('81','86','87','88') then '법인본점'
 + when substr([사업자번호],4,2) in ('82') then '법인비영리'
 + when substr([사업자번호],4,2) in ('83') then '국가지자체'
 + when substr([사업자번호],4,2) in ('84') then '법인외국'
 + when substr([사업자번호],4,2) in ('85') then '법인지점'
 + when substr([사업자번호],4,2) in ('89') then '개인사업자_종교단체'
 + when substr([사업자번호],4,2) in ('80') then '개인사업자_APT다단계'
 + else 'ERR'
 +end
 </code> </code>
  
  • data_analysis/work/corp_code.1583288605.txt.gz
  • Last modified: 2025/07/07 14:12
  • (external edit)