Mar-09-2022, 10:32 PM
Is that your full query?
If you are able to do your select against the same table, in your example = FROM Win32_ComputerSystem
Then you should be able to insert all those values into the DB per loop.
It would be better if you are able to provide a little more code that you are using or trying to better assist..
example i found online..
If you are able to do your select against the same table, in your example = FROM Win32_ComputerSystem
Then you should be able to insert all those values into the DB per loop.
It would be better if you are able to provide a little more code that you are using or trying to better assist..
example i found online..
mycursor = mydb.cursor() sql = "INSERT INTO customers (name, address) VALUES (%s, %s)" val = ("John", "Highway 21") mycursor.execute(sql, val) mydb.commit()I think providing more of your code would help.. im sure its just something that needs to be reorganized so that each loop inserts that set of data values.