Looking at that file attached, it's not a nice, "neat" text file with different lines seperated by carriage return/line feed characters. If you run something like the following code
Sub Test2
Dim file
set File = aqFile.OpenTextFile("C:\SQLServer\3.SQL", aqFile.faRead, aqFile.ctANSI, false)
Call Log.Message(File.LinesCount)
End Sub
You'll find that TestComplete sees that file as having only 1 line. So, the code you have will find the first instance of "CREATE TABLE" in that file and, since there is only 1 line, it will not find any more instances.
You have two things you can do here.
1) It looks like the file was not created as a text file but directly from SQL query editor or something like that. I would suggest creating the file and saving it using some other tool that will create a standard formatted text file with each line seperated by a CR/LF
2) You would have to write additional code to go through the line and find all instances on that line of "CREATE TABLE" rather than depending on there being only one instance per line.