MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 10th, 2004, 02:24 AM
akhtar_hayat akhtar_hayat is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 akhtar_hayat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old December 10th, 2004, 02:36 AM
Schol-R-LEA's Avatar
Schol-R-LEA Schol-R-LEA is offline
Commie Mutant Traitor
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Location: The People's Republic of Berkeley
Posts: 1,209 Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 4 h 44 m 24 sec
Reputation Power: 574
I ... oh, never mind.

Reply With Quote
  #3  
Old December 10th, 2004, 06:15 AM
r937's Avatar
r937 r937 is offline
SQL Consultant
Click here for more information.
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 17,912 r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 12 h 17 m 55 sec
Reputation Power: 1018
access: IIF(condition,truevalue,falsevalue)

sql server: CASE WHEN condition THEN truevalue ELSE falsevalue END
__________________
r937.com | rudy.ca

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > How to convert Iif to Case


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway