debug下面的代码:select c1.FCUSTID 内码, c1.FNUMBER 客户编码, c1.FFORBIDSTATUS 禁用状态, c1.FFAX 报表代理商, c1.F_GN_GROUPNUMBER 客户分组编号, c1.F_QYJL 区域经理, c1.F_KFY 订单员,c2.FNAME 客户名称 from T_BD_CUSTOMER c1, T_BD_CUSTLOCATION c2 inner join T_BD_CUSTLOCATION c2 on (c1. FNUMBER = c2. FNUMBER) where FFORBIDSTATUS = "A"
时间: 2024-04-03 16:36:14 浏览: 122
ChiToLetter.rar_site:www.pudn.com_汉字内码索引
这个SQL查询语句存在一个语法错误,应该改成下面这样:
```
SELECT c1.FCUSTID 内码, c1.FNUMBER 客户编码, c1.FFORBIDSTATUS 禁用状态, c1.FFAX 报表代理商, c1.F_GN_GROUPNUMBER 客户分组编号, c1.F_QYJL 区域经理, c1.F_KFY 订单员, c2.FNAME 客户名称
FROM T_BD_CUSTOMER c1
INNER JOIN T_BD_CUSTLOCATION c2 ON c1.FNUMBER = c2.FNUMBER
WHERE FFORBIDSTATUS = 'A'
```
这个查询语句使用了INNER JOIN关键字来关联T_BD_CUSTOMER表和T_BD_CUSTLOCATION表,按照FNUMBER字段进行关联。同时,将条件筛选放到了WHERE子句中,使用单引号来表示字符串常量。
阅读全文