I am just giving you another approach. Since, you are fetching data from an external system, you can use Liferay API to create users. This way, you will not be required to write SQL statements, no password security concern and no need to know what all tables are involved.
My 2 cents.
Please sign in to flag this as inappropriate.