A andrew4031 Unregistered / Unconfirmed GUEST, unregistred user! 2008-02-27 #1 select * from card where cardid in('11','22','33'.....后面还有几千个) 报错不允许从text到nvarchar的隐形转换 急急急急急急!救命啊!
J jxyghm Unregistered / Unconfirmed GUEST, unregistred user! 2008-02-28 #3 Sql字符串长度有限制,好像超过4000 就不行了吧。反正是因为Sql太长了
W wanhuan1982 Unregistered / Unconfirmed GUEST, unregistred user! 2008-02-28 #4 用select * from card where ((cardid='11' ) or (cardid='22' ) or (cardid='33' ))吧
W wanhuan1982 Unregistered / Unconfirmed GUEST, unregistred user! 2008-02-28 #5 不过要注意换行,如果一行太多,也会报错的.
J jack391 Unregistered / Unconfirmed GUEST, unregistred user! 2008-02-28 #7 lps说得对,可以用存储过程,建个临时表,把需要查询的cardid的值插进去,然后用连接查询。