在SQL中创建视图时出现Systax错误 [英] Systax error in creating view in SQL

查看:109
本文介绍了在SQL中创建视图时出现Systax错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SQl中遇到了错误创建视图。下面提到的是我的查询..



我尝试过:



I got an Error Creating view in SQl.The Below Mentioned is my query..

What I have tried:

CREATE  VIEW vwbuyerinvoicebankcharges AS 
SELECT a.SID AS InvoiceSid,
ISNULL((SELECT ROUND(SUM((ROUND(((b.Amount / c.Amount) * c.BankCharge),5) * c.ExchangeRate)),2)
FROM tblbuyerinvoiceadvancedetail B 
JOIN vwadvancemasterwithexrate C 
ON C.AdvanceSid = b.AdvanceSid WHERE b.MasterSid = a.SID 
ISNULL(SELECT ROUND(b1.NegoBankChargeAmt * b1.ExchangeRate,2) 
AS Round(B1.Negobankchargeamt*B1.ExchangeRate,2)
FROM vwbanknegotiationwithexrate B1 
WHERE b1.InvoiceSid = a.SID AS NegoBankCharge)
FROM tblbuyerinvoicemaster a GROUP BY a.SID

推荐答案

它'很难确切地说出你错在哪里,但是对于初学者来说,你必须要对不起 - 你有更多的(比)。有11(只有9)



我建议你从缩进开始,这样你就可以看到你想要输入的东西了,然后将括号与它们应该在的位置相匹配。我不完全确定哪些开放式括号需要它们的关闭,或者它们应该去哪里......
It'd difficult to say exactly where you are wrong, but for starters you brackets don;t match up - you have more "(" than ")". There are 11 "(" and only 9 ")"

I'd suggest that you start by indenting that so you can see what you were expecting to type, and then match up brackets to where they should be. I'm not entirely sure which open brackets need their close, or where they should go...


这篇关于在SQL中创建视图时出现Systax错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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