中国开发网: 论坛: 数据库: 贴子 559199
haitao
靠!!!刚才一个ESC损失惨痛!!!!!!!!!!
懒得再写对应的中文了。。。。。。。。。。

http://www.quest.com/2_0/registration.aspx?requestdefid=12492


why ms does not provider "select TOP n SKIP m ... from ... where ... order by ..."?




how get a table'field value if this table has this field,else return -1000
how can i write:

declare @t int
"
if exists(select 1 from syscolumns where id = object_id('myTable') and name='myField')
select @t=max(myField) from myTable --if myTable does not have field names 'myField', this line should be error!
else
set @t=-1000
"
now, i have to write like this " execute sp_executesql N'select @t=max(... "



how can i execute a long string sql?
execute sp_executesql [@stmt =] stmt
stmt must be nvarchar,so it'length only be 1-4000 char. and can not like this: @stmt=@sql1+@sql2+@sql3...
how can i execute a long string sql( whose length more then 10000)?
but execute (@sql1+@sql2+@sql3) is right.
我的blog:http://szhaitao.blog.hexun.com & http://www.hoolee.com/user/haitao
--以上均为泛泛之谈--
不尽牛人滚滚来,无边硬伤纷纷现 人在江湖(出来的),哪能不挨刀(总归是要的)
网络对话,歧义纷生;你以为明白了对方的话,其实呢?

您所在的IP暂时不能使用低版本的QQ,请到:http://im.qq.com/下载安装最新版的QQ,感谢您对QQ的支持和使用

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录