My Database Table Schema is something like
DocumentID: Name1: Name2: Name3: Name4: Location1: Location2: Location3....:Organization1:..
Now I have 3 Hashset's available having the above values (i.e one for name, one for location and one for organization)
In each single iteration of loop these hashset are being populated with above values.
At the end of each iteration the data from these hashset's is removed and new one's are created.
Now my problem is at each iteration I have to populate the sql table row (just 1 row each iteration) from these hashset values.
What I am not able to understand is if I have hard coded strings than simply I can use something like:
String sql = "INSERT INTO Table " +
"VALUES ('100', 'Zara', 'Akli', '18','100', 'Zara', 'Ali', '18')";
However I need to iterate through each hashset and insert (something like above) the data of all 3 hashset's in a single row. I am confused of how to write such statement. Remember my table is initially completely empty so I cant't use the where clause (something like "insert into.....where documentID="23423")