2

发送命令的字符限制(字符数)是多少,我该如何更改?

如果我运行一个长命令,它不会完全发送,并且在字符串的末尾附加了一个“S”(并且字符串被切断)所以有没有办法改变/查看我们可以发送多少个字符?

脚本:

发送: Set tSql="SELECT count(*) AS cc FROM table WHERE id IN ('1111111111','1111111112','1111111113','1111111114','1111111115','1111111116','1111111117','111111118 ,'111111119','111111120','111111121','111111122','111111123','1111111124','1111111125','1111111126','111111126','11111111127' 1111111131','1111111132','1111111133')"

这是我在缓存终端中得到的:

Set tSql="SELECT count(*) AS cc FROM table WHERE id IN ('1111111111','1111111112','1111111113','1111111114','1111111115','1111111116','1111111117','111111118', 111111119','11111110','111111121','111111122','111111123','1111111124','1111111125','1111111126','111111126','11111111127'

如您所见,命令后附加了一个 S,这最终会导致语法错误

4

2 回答 2

3

更简洁的方法是创建一个带有方法的类,其中包含您想要实现的任何实现,然后通过以下方式调用它:

send: Do ##class*Package.Class).Method(Arguments)

并传递所需的参数。

于 2016-06-01T06:28:10.950 回答
2

不确定它是如何限制的,但我可以说,您可以将任何长数据拆分为多个send. 它看起来像下面

send: Set tSql="SELECT count(*) AS cc FROM table WHERE id IN 
send: ('1111111111','1111111112','1111111113','1111111114','1111111115',
send: '1111111116','1111111117','1111111118','1111111119','1111111120',
send: '1111111121','1111111122','1111111123','1111111124','1111111125',
send: '1111111126','1111111127','1111111128','1111111129','1111111130',
send: '1111111131','1111111132','1111111133')"
于 2016-05-31T20:49:26.313 回答