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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 query with conditions

Author  Topic 

sunpalozzi
Starting Member

9 Posts

Posted - 2005-07-19 : 14:42:54
hello all,
I wonder if anyone can help me with this query. I am trying to do a query in store procedure includes some condtions:

select id, name, sum(iif(month(bookingdate()) = 1, total_prod, 0)) as jan_prod
from production
group by id
order by id

I am getting a syntax error. It works for other basebase program. What will be the correct syntax for what I am trying to do here??? thank you.

Sherry

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2005-07-19 : 15:00:16
Only one post is necessary.
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=52610

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -