You need to rename fields in your script so that they don't match other tables. QS automatically associates fields with the same names.
Or you can create a new concatenated key that combines fields that need to associate with the other tables.
If you are still stuck maybe you can provide actual data examples.
There's also a "quick" way to create unique names using Qualify and Unqualify... Qualify will prepend the table name to the field.
LOAD ID, name, measure from table1;
Assuming you still want ID fields to connect to other tables.
result will give you fields ID, table1.name, table1.measure