Copy link to clipboard
Copied
This is My insert query in vb6 but it insert 1 row in table
But i want insert all data in the table which contain the id =1.
Note that billtabsuport is blank
i want solution for this
strSQL = " select * from billtabsuport1 where StockID=" & lblid.Caption
Set DBrecordset = DBConnection.Execute(strSQL)
strSQL = " Insert into billtabsuport values('" & DBrecordset("StockID") & "','" & DBrecordset("C_Name") & "','" & DBrecordset("C_Add") & "','" & DBrecordset("C_Mobile") & "','" & DBrecordset("Invoice_No") & "','" & DBrecordset("Date") & "','" & DBrecordset("Order_No") & "','" & DBrecordset("T_Name") & "','" & DBrecordset("Dest") & "','" & DBrecordset("D_Date") & "','" & DBrecordset("Tyres_Serial_No") & "','" & DBrecordset("P_Desc") & "','" & DBrecordset("PR") & "','" & DBrecordset("Branded_NonBranded") & "','" & DBrecordset("Claim_No") & "','" & DBrecordset("Qty") & "','" & DBrecordset("U_Price") & "','" & DBrecordset("I_Value") & "','" & DBrecordset("V_Rate") & "','" & DBrecordset("V_Amt") & "','" & DBrecordset("Size") & "','" & DBrecordset("Pattern") & "','" & DBrecordset("TypesOfStock") & "','" & DBrecordset("TypesOfTube_Flap") & "','" & DBrecordset("VatAmount") & "')"
DBConnection.Execute (strSQL)
Copy link to clipboard
Copied
The syntax for inserting from one set of tables to a new table is:
insert into newtable
(field1, field2, etc)
select somefield1, somefield2, etc
from some other tables
where whatever