cstring format 哪里有错误?
sql.Format ("SET NOCOUNT ON declare @num int set @num=0 select 线路号, 站点名, 路线=cast('('+线路号+':'+站点名 as varchar(4000)), 序号=序号, tt=@num into # from 线路站点 where 站点名='%s'; while @@rowcount>0 and not exists (select * from # where 站点名='%s') begin set @num=@num+1 insert into #(路线,线路号,站点名,序号,tt) select 路线=a.路线+case when a.线路号=b.线路号 then '->'+b.站点名 else ')转('+b.线路号+':'+b.站点名 end, b.线路号,b.站点名,b.序号,@num from # a, 线路站点 b where a.tt=@num-1 and(a.站点名=b.站点名 and a.线路号<>b.线路号 or a.线路号=b.线路号 and (a.序号=b.序号+1 or a.序号=b.序号-1)) and len(a.路线)<4000 and patindex('%[ >]'+b.站点名+'[-)]%',a.路线)=0 end select '路线'=路线+')' from # where tt=@num and 站点名='%s' if @@rowcount =0 select * from # ;drop table #;",station_start,station_end,station_end);
比较长了点 但不是错误吧?
那到底哪里出错了?