访问IIF到SQL语句转换 [英] Access IIF to SQL statement convert

查看:98
本文介绍了访问IIF到SQL语句转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(选择IIF(MAX(bill_bno)IS NULL,1,MAX(bill_bno)+1)来自rec_all,其中rw = 0且iif(月(bill_date)> = 1和月(bill_date)= 1和月(日期)< = 3,年(日期) - 1,年(日期)))



我尝试过:



我有访问查询,我正在将其转换为SQL Server 2012.我正在寻找相当于SQL Server中的Access IIF语句。

以下是我试图转换的声明;

解决方案

IIF()SQL SERVER 2012中的逻辑功能| SqlHints.com [ ^ ]

("select IIF(MAX(bill_bno) IS NULL,1,MAX(bill_bno)+1) from rec_all where rw=0 and iif(month(bill_date)>=1 AND month(bill_date)= 1 And Month(Date) <= 3, Year(Date) - 1, Year(Date)))

What I have tried:

I have access query and I am converting it to SQL Server 2012. I'm looking for the equivalent to the Access IIF statement in SQL Server.

Below is the statement I am trying to convert;

解决方案

IIF() LOGICAL FUNCTION IN SQL SERVER 2012 | SqlHints.com[^]


这篇关于访问IIF到SQL语句转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆