How do i write INSERT statement if i get the values of colA from TableX, colB from TableY and colC from TableZ?
eg: INSERT INTO TableA (colA, colB, colC) VALUES (?,?
You will need to join the tables that you want to make the selection from.
Here is a resource on SQL joins:
www.w3schools.com/sql/sql_join.asp
You also might want to check out this free PDF book from the guys at www.simple-talk.com that covers SQL basics:
SQL Server Crib Sheet Compendium