In Access, case when then else end does not support switch instead. caseswitch
In Access, case when then else end cannot be replaced by switch.
Here, we mainly implement multiple fields in a table, compare multiple fields, and obtain the maximum or minimum values for processing.
Case when then else end example
<span style="font-family:Microsoft YaHei;font-size:14px;">selece f1,f2,(case when f1>f2 then f1 else f2 end) as a from table</span>
But it is found that access is not easy to make
Next, replace the following with the switch supported by access:
<Span style = "font-family: Microsoft YaHei; font-size: 14px;"> select * from (select topvalue, bottomvalue, leftvalue, rightvalue, switch (a> B, a, a <= B, B) as result from (select topvalue, bottomvalue, leftvalue, rightvalue, switch (topvalue> bottomvalue, topvalue, topvalue <= bottomvalue, bottomvalue) as, switch (leftvalue> rightvalue, leftvalue, leftvalue <= rightvalue, rightvalue) as B from imageh Andle) order by result desc query results: </ span>
Record it here, haha