SQL插入语句一问~ 使用存储过程吧。要不一个SQL语句很难实现。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 "insert tresult (fstdno,f) values((select fstdno from tstudent_info where fname='"& request.form("stuname") &"'),"& request.form("stu") &")" 错误类型:Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)[Microsoft][ODBC SQL Server Driver][SQL Server]在此上下文中不允许使用子查询。只允许使用标量表达式。 那你就用过程吧!create proc 名@stuname varchar(100),@stu intbegininsert tresult (fstdno,f) select fstdno,@stu from tstudent_info where fname=@stunameend 或:"insert tresult (fstdno,f) select fstdno,"& request.form("stu") &" from tstudent_info where fname='"& request.form("stuname") &"'"试试 数据库的学习应该走怎样的一条路? 在线等,请大家帮忙,数据查询的问题。 asp连接远程sql 求一条sql 语句的写法,大家来帮帮忙 怎么更改数据库文件和日志文件大小? 怎么同时更新不同服务器上两张表的内容? dbf文件导入sql server遇到问题 多个查询参数时判断怎么写? SQL脚本问题,在线等待 如何用Oracle调用外部的C过程? 存储过程不能声名临时变量,只能声名参数吗? 关于日期的输入
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]在此上下文中不允许使用子查询。只允许使用标量表达式。
@stuname varchar(100),
@stu int
begin
insert tresult (fstdno,f) select fstdno,@stu from tstudent_info where fname=@stuname
end