Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
miked1978
Starting Member
25 Posts |
Posted - 2008-09-18 : 10:31:54
|
| I'm new to SQL and am trying to convert an Access Database into a DTS package in SQL 2000. Anyways I have an Access query I'm trying to do and have the following code I need to convert to a SQL statement:Sum(IIf([SVc]>0,[SVc],0)) AS Ahead, Sum(IIf([SVc]<0,[SVc],0)) AS Behind,What would my SQL Statement be?Thanks for your help. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-09-18 : 10:33:11
|
sum(case when [SVc] > 0 then [SVc] else 0 end) as Ahead KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
miked1978
Starting Member
25 Posts |
Posted - 2008-09-18 : 10:41:23
|
| thank you |
 |
|
|
|
|
|