CASE conversion from IIF

前端 未结 1 1669
野趣味
野趣味 2021-01-26 06:07

I started off with SQL (access)

IIf(Len([CAT]) < 3, 
Left([CAT],1) & 0 & Right([CAT],1),
[CAT]) AS CAT1, 
[HD0] &

IIf([TABLE].[HD1]<>\"00\"         


        
相关标签:
1条回答
  • 2021-01-26 06:15

    MS Access syntax is entirely different to Oracle syntax. No square brackets, and different names for the SQL functions. http://docs.oracle.com/cd/E11882_01/server.112/e17118/functions.htm#SQLRF006

     Case
       When length(cat) < 3
       Then SubStr(cat,1,1) || '0' || SubStr(cat,-1,1)
       Else cat
     End cat1
    
    0 讨论(0)
提交回复
热议问题