首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

小弟我这个sql语句错哪了啊

2012-04-24 
我这个sql语句哪里错了啊?SQL codeinsert into T_Data select * from(select SUBSTRING(nm,5,10000)*RAND(

我这个sql语句哪里错了啊?

SQL code
insert into T_Data select * from(    select SUBSTRING(nm,5,10000)*RAND(),     null,    null,    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    null,    null,    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    null,    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    null,    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    (select SUBSTRING(nm,5,4)*RAND()),    '企业',    'EN',    '',    '',    2007,    1,    (select SUBSTRING(nm,5,4)*RAND()) from T_Enterprise) 


我这里报错:(select SUBSTRING(nm,5,4)*RAND()) from T_Enterprise) “ ')' 附近有语法错误。”

[解决办法]
按你的语句就成了
select * from(A,B,C,D.... from TableB)
[解决办法]
1楼正解。。。
[解决办法]
探讨
SQL code

insert into T_Data select * from(
select SUBSTRING(nm,5,10000)*RAND(),
null,
null,
(select SUBSTRING(nm,5,4)*RAND()),
(select SUBSTRING(nm,5,4)*RAND()),
(select SUB……

热点排行