'='附近的语法不正确。 [英] Incorrect syntax near '='.

查看:108
本文介绍了'='附近的语法不正确。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

语句从一个版本的软件迁移到SQL Express,我纠正了多个错误。 '='附近的语法不正确





Statement migrated from one version of software to SQL Express there were multiple errors I have corrected those. Incorrect syntax near '='


[SELECT bdglin.ttlbdg FROM bdglin,bdglin.recnum Inner Join = {jobcst.jobnum} and bdglin.cstcde = {jobcst.cstcde}] + [SELECT sbcgln.bdgprc FROM sbcgln,sbcgln Inner Join prmchg on sbcgln.recnum = prmchg.recnum,prmchg.jobnum Inner Join = {jobcst.jobnum} and sbcgln.cstcde = {jobcst.cstcde} and prmchg.status =1]





我的尝试:



用In



What I have tried:

Replacing first = sign with In

推荐答案

尝试将其粘贴到SQL Server Management Studio中并查看错误位置
Try pasting it into SQL Server Management Studio and see where it errors


[SELECT bdglin.ttlbdg FROM bdglin,bdglin.recnum Inner Join = {jobcst.jobnum}
    and bdglin.cstcde = {jobcst.cstcde}] + 
[SELECT sbcgln.bdgprc FROM sbcgln,sbcgln
    Inner Join prmchg on sbcgln.recnum = prmchg.recnum,prmchg.jobnum 
    Inner Join = {jobcst.jobnum} and sbcgln.cstcde = {jobcst.cstcde} 
    and prmchg.status =1]





复制并重新格式化以使阅读更容易。

首先......看看第一行的内部加入;不应该是:

'Inner Join on< field> =< field>'

再次在最后一行。



从修复那些然后看看还有什么不起作用。



Copied and reformatted to make reading easier.
First... look at the 'Inner Join' on the first line; shouldn't it be:
'Inner Join on <field> = <field>'
And again on the last line.

Start with fixing those and then see what else doesn't work.


第一行的内连接需要一个表名后跟一个ON子句......然后你有field = field。
The inner join on the first line needs a table name followed by an ON clause...then you have field = field.


这篇关于'='附近的语法不正确。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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