本帖最后由 yhdata_zfYQk03B 于 2022-3-3 23:27 编辑
请帮忙看看如下SQL判断语句如何可以优化一下,感谢!!
select | | | A.fsaf, | | A.fdssag, | | A.yrtre, | | case when (A.fdssag='T169罛 ' | | or A.fdssag='L562窸J' | | or A.fdssag='Y435?' | | or A.fdssag='K896?:' | | or A.fdssag='D443?P' | | or A.fdssag='G624?/' | | or A.fdssag='I241翭V' | | or A.fdssag='Q785穙/' | | or A.fdssag='Y624僚N' | | or A.fdssag='E88淋4' | | or A.fdssag='B648緰S' | | or A.fdssag='S231綛:' | | or A.fdssag='W191帛@' | | or A.fdssag='W106繣0' | | or A.fdssag='L151?' | | or A.fdssag='T558礣O' | | or A.fdssag='W680皭' | | or A.fdssag='H841?' | | or A.fdssag='T805骏<' | | or A.fdssag='F701砄 ' | | or A.fdssag='T95綈1' | | or A.fdssag='N612党' | | or A.fdssag='O695緻' | | or A.fdssag='D838禎' | | or A.fdssag='H494纈?' | | or A.fdssag='B642罇' | | or A.fdssag='Q786?' | | or A.fdssag='B646卵&' | | or A.fdssag='K389簻P' | | or A.fdssag='E297砵9' | | or A.fdssag='J114渐*' | | or A.fdssag='C981?7' | | or A.fdssag='V560懊?' | | or A.fdssag='W612?6' | | or A.fdssag='T169罛') | | and (or A.yrtre='@914?.' | | or A.yrtre='T638篻 ' | | or A.yrtre='T476侈/' | | or A.yrtre='Z935秔5' | | or A.yrtre='V838呈' | | or A.yrtre='K161颁R' | | or A.yrtre='O557?' | | or A.yrtre='K53礟5' | | or A.yrtre='R290?7' | | or A.yrtre='N740穧,' | | or A.yrtre='H506紭U' | | or A.yrtre='K308氛S' | | or A.yrtre='S925江Y' | | or A.yrtre='K514礼*' | | or A.yrtre='K156紒' | | or A.yrtre='P356聡A' | | or A.yrtre='H281从' | | or A.yrtre='C309紷 ' | | or A.yrtre='Z26渡H' | | or A.yrtre='Q81粅 ' | | or A.yrtre='Y65箃' | | or A.yrtre='R876历' | | or A.yrtre='O732?' | | or A.yrtre='F678菊' | | or A.yrtre='T489井/' | | or A.yrtre='U638盰#' | | or A.yrtre='J554舰E' | | or A.yrtre='V270奎C' | | or A.yrtre='N270?2' | | or A.yrtre='W204寡&' | | or A.yrtre='U536掘9' | | or A.yrtre='I702?M' | | or A.yrtre='P616粏(' | | or A.yrtre='V884坎6') then '电信' | | when (A.fdssag='T169罛 ' | | or A.fdssag='L562窸J' | | or A.fdssag='Y435?' | | or A.fdssag='K896?:' | | or A.fdssag='D443?P' | | or A.fdssag='G624?/' | | or A.fdssag='I241翭V' | | or A.fdssag='Q785穙/' | | or A.fdssag='Y624僚N' | | or A.fdssag='E88淋4' | | or A.fdssag='B648緰S' | | or A.fdssag='S231綛:' | | or A.fdssag='W191帛@' | | or A.fdssag='W106繣0' | | or A.fdssag='L151?' | | or A.fdssag='T558礣O' | | or A.fdssag='W680皭' | | or A.fdssag='H841?' | | or A.fdssag='T805骏<' | | or A.fdssag='F701砄 ' | | or A.fdssag='T95綈1' | | or A.fdssag='N612党' | | or A.fdssag='O695緻' | | or A.fdssag='D838禎' | | or A.fdssag='H494纈?' | | or A.fdssag='B642罇' | | or A.fdssag='Q786?' | | or A.fdssag='B646卵&' | | or A.fdssag='K389簻P' | | or A.fdssag='E297砵9' | | or A.fdssag='J114渐*' | | or A.fdssag='C981?7' | | or A.fdssag='V560懊?' | | or A.fdssag='W612?6' | | or A.fdssag='T169罛') | | and (or or A.yrtre='Z912礩 ' | | or A.yrtre='E121馈G' | | or A.yrtre='K827哥U' | | or A.yrtre='V509祋!' | | or A.yrtre='@694沧%' | | or A.yrtre='N322炕U' | | or A.yrtre='H585歌' | | or A.yrtre='C108?M' | | or A.yrtre='I750桂' | | or A.yrtre='D141絜7' | | or A.yrtre='L778辆@' | | or A.yrtre='A428碮I' | | or A.yrtre='W716?-' | | or A.yrtre='M24基2' | | or A.yrtre='F362?@' | | or A.yrtre='Q120筫?' | | or A.yrtre='U749箭P' | | or A.yrtre='L808?A' | | or A.yrtre='M311回 ' | | or A.yrtre='@939惯W' | | or A.yrtre='J913' | | or A.yrtre='U62翠=' | | or A.yrtre='O586箼-' | | or A.yrtre='L468凋' | | or A.yrtre='M627?' | | or A.yrtre='Y348储R' | | or A.yrtre='P902汲>' | | or A.yrtre='H362矐' | | or A.yrtre='T441僵*' | | or A.yrtre='O440?' | | or A.yrtre='D73?"' | | or A.yrtre='D148荷' | | or A.yrtre='A702?' | | or A.yrtre='T472?') then '联通' | | else '移动' end as "运营商" | FROM jk01_YiWen_Question A |
|