|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to convert Iif to Case
Hi ,
I am facing problem for converting MS Access 2000 queries to SQL Server views.Specially in case of Iif statement given below IIf(Sum((Hour([out]-[in])+Minute([out]-[in])/60)/(Hour([deptend]-[deptstart])+Minute([deptend]-[deptstart])/60))<1,Round(Sum((Hour([out]-[in])+Minute([out]-[in])/60)/(Hour([deptend]-[deptstart])+Minute([deptend]-[deptstart])/60)),2),1) AS [Normal Attn] what will be the 'CASE' statement of the above query. I am waiitng for your kind reply Best Regards AKH |
|
#2
|
||||
|
||||
|
I ... oh, never mind.
|
|
#3
|
||||
|
||||
|
access: IIF(condition,truevalue,falsevalue)
sql server: CASE WHEN condition THEN truevalue ELSE falsevalue END |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > How to convert Iif to Case |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|