以下是引用louzhenghong在2016-5-11 15:30:02的发言:
SQLEXEC(con1,"select a.*,tel as 业主电话,mobile as 业主手机,calibre as 口径 from bx a,m_meter b,a_client c,a_card d where a.卡号 =d.card_no and d.client_no = c.client_no and b.meter_id = d.meter_id order by 报修时间 desc","bx02")
*?SQLEXEC(con1,"select bx.*,tel as 业主电话,mobile as 业主手机,calibre as 口径 from bx ,m_meter ,a_client ,a_card where bx.卡号 =a_card.card_no and a_card.client_no = a_client.client_no and meter.meter_id = a_card.meter_id order by 报修时间 desc","bx02")
这2句有什么不同,一条可以,一条不行,怪事,太长了?
SQLEXEC(con1,"select a.*,tel as 业主电话,mobile as 业主手机,calibre as 口径 from bx a,m_meter b,a_client c,a_card d where a.卡号 =d.card_no and d.client_no = c.client_no and b.meter_id = d.meter_id order by 报修时间 desc","bx02")
*?SQLEXEC(con1,"select bx.*,tel as 业主电话,mobile as 业主手机,calibre as 口径 from bx ,m_meter ,a_client ,a_card where bx.卡号 =a_card.card_no and a_card.client_no = a_client.client_no and meter.meter_id = a_card.meter_id order by 报修时间 desc","bx02")
这2句有什么不同,一条可以,一条不行,怪事,太长了?
一般情况,不要太长,如果你的SQL语句很长,你可以这样
TEXT TO SqlStr NOSHOW TEXTMERGE PRETEXT 4
select bx.*,tel as 业主电话,mobile as 业主手机,calibre as 口径
from bx ,m_meter ,a_client ,a_card
where bx.卡号 =a_card.card_no and a_card.client_no = a_client.client_no and meter.meter_id = a_card.meter_id
order by 报修时间 desc
endtext
?sqlexec(con1,SqlStr,'bx02')
*另外,你看红色字,是不是有问题