开发者

Multiple record insert - Classsic ASP

开发者 https://www.devze.com 2023-02-20 15:31 出处:网络
I need to fetch data from one table (multiple rows) and insert into other table after modifying and adding some new fields.

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

For example:

Table 1 itemid, price, qnt, date_of_dispatch ,et开发者_Python百科c

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

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

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...

Multiple record insert - Classsic ASP


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消