-
IF statement from Access query
I am switching our Access queries to SQL views. How do I make this Access
97 "IF" statement a SQL 7 "criteria"?
FollowUp: IIf(IsNull([acct id]),"","Awaiting Follow Up")
Any help is very appreciated.
-
Re: IF statement from Access query
Eric <ericb@tfillc.com> wrote in message news:39c24ce1$1@news.devx.com...
>
> I am switching our Access queries to SQL views. How do I make this Access
> 97 "IF" statement a SQL 7 "criteria"?
>
> FollowUp: IIf(IsNull([acct id]),"","Awaiting Follow Up")
>
> Any help is very appreciated.
CASE [acct id] WHEN NULL THEN "" ELSE "Awaiting Follow Up" END
--
Colin McGuigan
-
Re: IF statement from Access query
"Colin McGuigan" <colin@chicor.com> wrote:
>Eric <ericb@tfillc.com> wrote in message news:39c24ce1$1@news.devx.com...
>>
>> I am switching our Access queries to SQL views. How do I make this Access
>> 97 "IF" statement a SQL 7 "criteria"?
>>
>> FollowUp: IIf(IsNull([acct id]),"","Awaiting Follow Up")
>>
>> Any help is very appreciated.
>
>CASE [acct id] WHEN NULL THEN "" ELSE "Awaiting Follow Up" END
>
>--
>Colin McGuigan
>
>
>
Thanks, Colin, but I get an error message: "CASE statement not supported".
Any other ideas?
-
Re: IF statement from Access query
Eric <ericb@tfillc.com> wrote in message news:39c25b29$1@news.devx.com...
> Thanks, Colin, but I get an error message: "CASE statement not supported".
>
> Any other ideas?
You're using SQL Server's poor excuse for a View Designer, aren't you? The
error is a 'Query Definitions Differ' error, or a 'SQL Syntax Errors
Encountered' error?
If so, the 'not supported' bit is just telling you that the View Designer
can't parse the statement. It doesn't mean it's invalid. If it's 'Query
Definitions Differ', just click 'Yes'. If it's 'SQL Syntax Errors
Encountered', just ignore it. If you look at your list of views, it should
show up just fine.
--
Colin McGuigan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks