good moring all,
i'm stuck in a problem. i want to insert some records from one table to
another table. The two of this have relationship ship PK--FK. errors
appear like:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Subquery returned more than 1 value. This is not permitted when the
subquery follows =, !=, <, <= , >, >= or when the subquery is used as an
expression.
my code is:
set ceknomin=server.CreateObject("ADODB.Recordset")
ceknumin.open "select min(id) as numinimum from temporder where
nuorder="&trim(request.form(inputorder)),dbconn,1,2
beginnu=ceknumin("numinimum")
ceknumin.close
set ceknumin=nothing
set ceksum=server.CreateObject("ADODB.Recordset")
ceksum.open "select max(id) from temppesanan where
nuorder="&trim(request.form(inputorder)),dbconn,1,2
maxnu=ceksum.recordcount
ceksum.close
set ceksum=nothing
for i=beginnu to (=beginnuto +maxnu) step 1
set tablesource=server.CreateObject("ADODB.Recordset")
sqlsource="select * from temporder where id="&i
tablesource.open sqlsource,dbconn,1,2
while not tablesource.eof
inputsql="insert into
realorder(nuorder,inputcode,sumorder)
values("&trim(tablesource("nuorder"))&",'"&trim(tablesource("inputcode"))&"',"&trim(tablesource("sumorder"))&")"
dbconn.execute(inputsql)
tablesource.movenext
wend
tablesource.close
set tablesource=nothing
next
i'm very hope and thanks for help me
Liston
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/