当前位置: 代码迷 >> ASP.NET >> 急 datagrid中用left join如何出错
  详细解决方案

急 datagrid中用left join如何出错

热度:9756   发布时间:2013-02-26 00:00:00.0
急..在线等. datagrid中用left join怎么出错
ada.SelectCommand.CommandText   =   "SELECT   top   5   [alarm.zone]   as   [zone],[alarm.nox]   as   [nox],[alarm.date]   as   [date],[alarm.time]   as   [time],[alarm.distance]   as   distance,[town.dept]   as   [dept]   FROM   [ALARM]   left   JOIN   [town]   ON   ([ALARM.NOX]   =   [town.NOX])   AND   ([ALARM.ZONE]   =   [town.ZONE])     order   by   date   desc,time   desc   "

提示无效的括号名称   '[ALARM.NOX] '。

我要是不用lift   join   就可以

------解决方案--------------------------------------------------------
SQL语句的问题
------解决方案--------------------------------------------------------
你把这个
SELECT top 5 [alarm.zone] as [zone],[alarm.nox] as [nox],[alarm.date] as [date],[alarm.time] as [time],[alarm.distance] as distance,[town.dept] as [dept] FROM [ALARM] left JOIN [town] ON ([ALARM.NOX] = [town.NOX]) AND ([ALARM.ZONE] = [town.ZONE]) order by date desc,time desc
放在SQL里去看看 就会知道哪里语法有错了
------解决方案--------------------------------------------------------
你在SQL中运行一下 就会知道了应该
我这样看不出来 因为我没你的数据库
  相关解决方案