将查询sql转换为访问权限 [英] convert query sql to access

查看:63
本文介绍了将查询sql转换为访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

单词'when'时的错误

--------------------------------- ---------------

error on word 'when'
------------------------------------------------

select distinct kala.code,kala.name,
 
       sum(case when (dbo.tblInvVoucher.VType = 'ran')
                then dbo.tblInvArticle.Amount
            end) as رسید,
             
            sum(case when (dbo.tblInvVoucher.VType = 'han')
                then dbo.tblInvArticle.Amount
            end) as حواله
      
     ,sum(case when (dbo.tblInvVoucher.VType = 'mda')
                then dbo.tblInvArticle.Amount
            end) as [موجودی اولیه]
        
from dbo.tblInvArticle,dbo.tblInvVoucher,kala
where tblInvArticle.VId=tblInvVoucher.VId and kala.code=tblInvArticle.GoodId and FYear='1392'
group by code,name

推荐答案

或许,您正在寻找IIF [ ^ ]功能。
Probably, you're looking for IIF[^] function.


嗨穆罕默德,



你可以尝试使用iif功能,因为Maciej在将sql转换为访问时说。

Hi Mohammed,

You can try with iif funtion as Maciej said while converting sql to access.
iif([S].[Gender] = 1,'Male',iif([S].[Gender]=2,'Female','Other')) as [Gender]


这篇关于将查询sql转换为访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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