多记录插入 - Classsic ASP [英] Multiple record insert - Classsic ASP

查看:106
本文介绍了多记录插入 - Classsic ASP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从一个表(多行)获取数据和修改,并增加了一些新领域后插入到另一个表。

I need to fetch data from one table (multiple rows) and insert into other table after modifying and adding some new fields.

例如:

表1的itemid,价格,QNT,
  date_of_dispatch等

Table 1 itemid, price, qnt, date_of_dispatch ,etc

表2 Invoiceid,Invoicedate,
  CUSTOMER_ID,商品ID,价格,QNT,
  total_amt,date_of_dispatch,
  grandtotal

Table2 Invoiceid, Invoicedate, customer_id, itemid, price, qnt, total_amt, date_of_dispatch, grandtotal

请帮我用的MS Access使其在传统的ASP

Please help me to make it in Classic asp with ms access

在第一阶段,我会在页面从表一(多行)取记录,以便用户可以修改,再经过点击Save按钮插入present形式的所有数据到表2。

in first stage I will fetch record in page from table one (multiple rows) so user can modify , then after click save button insert all data in present form into table2.

请帮忙...

Please help...

推荐答案

这是超过传统的ASP问题上的SQL问题。从表单捕获的更新记录的ID(逗号分隔列表ID值),然后,改变你的SQL是这样的:

This is more of a SQL question than classic ASP question. Capture the IDs of the updated records from the form (list of comma separated ID values) and then and change your SQL to be something like this:

Insert into Table2 (Field1, Field2, Field3)
Select Field1, Field2, Field3 From Table1 Where ID IN (Comma Separated List of IDs)

这篇关于多记录插入 - Classsic ASP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆