有关SQL插入语句,急!!!!在线等!!!!各位大侠帮帮忙啊!!!! ( 积分: 50 )

  • 主题发起人 主题发起人 丁丁小
  • 开始时间 开始时间

丁丁小

Unregistered / Unconfirmed
GUEST, unregistred user!
执行以下语句时报错:<br>insert&nbsp;into&nbsp;tSystemConfig&nbsp;<br><br>(QueryData,QueryFile,UserID,Quantity,Charge,Total,Faith,HurryData,<br>HurryFile,HurryTime,NormalCash,NormalMonth,NormalStart,NormalEnd,SpecialCash,<br>SpecialMonth,SpecialStart,SpecialEnd,RingCount,LinkType,Appeal,Repair,<br>Consultation,Wrong,HintType,NotifyType,DataCollectionConnStr,FetchDataSqlStr,<br>NormalStartDay,NormalEndDay,SpecialStartDay,SpecialEndDay,SpecialEndDay,SpecialSms,<br>CutoffSms)<br><br>VALUES&nbsp;<br><br>(TXT,C:/CallCenter/Service/charge.txt,USERID,1,1,1,1,TXT,C:/CallCenter/Service/charge.txt,<br>2000-1-1&nbsp;15:30:00,0,1,2000-1-1&nbsp;8:00:00,2000-1-1&nbsp;18:30:00,0,1,2000-1-1&nbsp;8:00:00,<br>2000-1-1&nbsp;18:00:00,2,PICKUP,1,2,3,4,DEFAULT,TTS,user&nbsp;ID=system;&nbsp;password=manager;&nbsp;Data&nbsp;Source=eerp;&nbsp;persist&nbsp;security&nbsp;info=false,<br>SELECT&nbsp;(SELECT&nbsp;USER_TYPE&nbsp;FROM&nbsp;YH_USER&nbsp;WHERE&nbsp;USER_ID&nbsp;=&nbsp;f_cur_us.总户号)&nbsp;AS&nbsp;用户类型,&nbsp;(SELECT&nbsp;COUNT(*)&nbsp;FROM&nbsp;DF_USER_FEE&nbsp;WHERE&nbsp;(USER_ID&nbsp;=&nbsp;f_cur_us.总户号)&nbsp;AND&nbsp;(STATUS&nbsp;=&nbsp;'未')&nbsp;AND&nbsp;(POWER_VALUE&nbsp;&gt;&nbsp;0)&nbsp;AND&nbsp;(POWER_CHARGE&nbsp;&gt;&nbsp;0))&nbsp;+&nbsp;1&nbsp;AS&nbsp;欠费月数,&nbsp;总户号,&nbsp;(SELECT&nbsp;PHONE&nbsp;FROM&nbsp;YH_USER&nbsp;WHERE&nbsp;USER_ID&nbsp;=&nbsp;f_cur_us.总户号)&nbsp;AS&nbsp;电话,&nbsp;(电费年&nbsp;+&nbsp;电费月)&nbsp;AS&nbsp;发生年月,&nbsp;合计电量,&nbsp;合计电费,&nbsp;滞纳金,&nbsp;(SELECT&nbsp;SUM(DUE_CHARGE&nbsp;-&nbsp;PAID_CHARGE)&nbsp;FROM&nbsp;DF_CUR_USER&nbsp;WHERE&nbsp;DF_CUR_USER.USER_ID&nbsp;=&nbsp;f_cur_us.总户号)&nbsp;AS&nbsp;欠费,(SELECT&nbsp;USER_NAME&nbsp;FROM&nbsp;YH_USER&nbsp;WHERE&nbsp;USER_ID&nbsp;=&nbsp;f_cur_us.总户号)&nbsp;AS&nbsp;用户名&nbsp;FROM&nbsp;f_cur_us,<br>1,10,1,10,0,0,1)<br><br>报错信息如下:<br>服务器:&nbsp;消息&nbsp;128,级别&nbsp;15,状态&nbsp;1,行&nbsp;12<br>在此上下文中不允许使用&nbsp;'TXT'。此处只允许使用常量、表达式或变量。不允许使用列名。<br>服务器:&nbsp;消息&nbsp;132,级别&nbsp;15,状态&nbsp;1,行&nbsp;12<br>标签&nbsp;'C'&nbsp;已声明。标签名称在批查询或存储过程内部必须唯一。<br>服务器:&nbsp;消息&nbsp;170,级别&nbsp;15,状态&nbsp;1,行&nbsp;16<br>第&nbsp;16&nbsp;行:&nbsp;'1'&nbsp;附近有语法错误。
 
語法不正確,要注意引號的使用等等
 
十分感谢!!!![:)]
 
你的值列表居然不用引号,你特别牛!!!
 
后退
顶部