Well, an update, a lot of work getting into this but I did some more work.
I'm not very familiar with PHP, Java or SQL. I'm not advanced but I get by. So, I resorted to my preferred languages that I have used for many years. Visual Basic, Fortran and C+.
I chose to write some code in VB mainly because I was just looking to do some quick text manipulation and VB can run undeclared variables as well as full variant variables (sloppy code but I wasn't ready to spend days on this.)
1) As in post #14 - item #3, extracted thread id's from SQL file of xf_thread but use criteria of A=0 first post id's, B=0 last post id's and C=0 first and last post id's.
2) Removed from the array any duplicate id's that satisfied multiple criteria of #1.
3) Deleted entries in xf_thread sql file that were saved from #2. (don't need this but already had data handy)
4) Parsed vb thread sql file and found all thread id's from #2.
5) Verified all had non 0 or null first and last post id's.
6) Extracted all vb thread rows that matched #4.
7) Created new sql file and put all vb thread rows from # into the new sql file.
8) Extracted all vb post rows that matched threadid from #4.
9) Created new sql file and put all vb post rows from #8 into the new sql file.
I think my next step is to:
1) Get the 2 sql file(s) setup for import (formatted correctly)
2) Remove xf_thread rows from db that match #4 (if needed.)
3) Remove xf_post rows from db that match #4 (i needed.)
4) Import 2 sql files for new thread and post tables but format for xf from vb.
I'm sure all this all could be done via php or just entering sql queries but I am not as versed in php and sql. I am going through pdf ebooks on sql commands right now to learn.
Also, I'm pretty sure on import the rows that need to read in can be deleted or over written but I'm still learning.
Is there any information available that explains what is needed in the sql file for import? I can copy what I have in the export files but unsure.
Any help with suggestions on a better way to do this is greatly appreciated.
Regards