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
 General SQL Server Forums
 New to SQL Server Programming
 convert access query to sql 2000 query

Author  Topic 

smorty44
Yak Posting Veteran

93 Posts

Posted - 2008-01-30 : 16:42:02
I'm having trouble converting this access query into a sql 2000 query.
Your help would be appreciated:

IIf(nz([PTicketNum],"M999Z")="0","M999Z",IIf(Trim(nz([PTicketNum],"M999Z"))="","M999Z",nz([PTicketNum],"M999Z")))

Here is what I have, but I'm not confident it is correct:
CASE WHEN (PTicketNum = '0' OR PTicketNum IS NULL) THEN 'M999Z' else PTicketNum END AS Ticket

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-01 : 10:18:08
Hint

IIF-> CASE WHEN...
NZ to ISNULL(col,'value')

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -