-4
我有一个SQL case语句这样SQL case语句为组合框
select Distinct y.SupplierID,y.Name,y.AddWho ,
"StatusDesc=CASE when y.status='N' then 'NEW' " & _
"when y.status='B' then 'BLACKLISTED'" & _
"when y.status='Q' then 'QUALIFIED'" & _
"when y.status='R' then 'REJECTED' end , " & _
"FlowStatusDesc = CASE when y.flowstatus='RC' then 'UNDER REVIEW'" & _
"when y.flowstatus='PE' then 'POTENTIAL EXCLUSIVE'" & _
"when y.flowstatus='PO' then 'POTENTIAL ORDINARY' ELSE '' end," & _
"OrderNo=case when y.status='N' and flowstatus='' then '1'" & _
"when y.status='N' and y.flowstatus<>'' then '2' " & _
"when y.status='R' and y.flowstatus='' then '3'" & _
"when y.status='R' and y.flowstatus<>'' then '4'" & _
"when y.status='Q' and y.flowstatus='' then '5'" & _
"when y.status='Q' and y.flowstatus<>'' then '6'" & _
"when y.status='B' and y.flowstatus='' then '7'" & _
"when y.status='B' and y.flowstatus<>'' then '8' else '9' end " & _
"from AP_Supplier y" & _
" left outer join SC_User u on y.addwho=u.userid " & _
"left outer join SC_Company co on co.companycode=u.companycode " & _
"where flowstatus is not null " & _
"group by y.SupplierID,y.name,y.status,y.flowstatus,y.addwho " & _
"order by orderno"
如何,如果我可以加载所有的case语句条件,如“新”,“合格”,‘注册’和flowstatuses成组合框在vb.net?你能给我一个例子吗?我试过这样做了很长一段时间,感谢。
是否需要将这些状态的单独列表加载到组合框中?不是从这个查询? –
我的意思是,会有2个组合框,每个组合框。对于地位,它将是“新的”,“合格的”,“列入黑名单”并被拒绝,而对于流量状态,“审查中”,“潜在普通”和“潜在排他”。 –