Processing files using ksh shell

I need to write a Shell Script to process a huge folder of nearly 20 levels.I have to process each and every file and check which files contain lines like select insert update
When I mean line it should take the line till I find a semicolon in that file. I should get a result like this

  C:/test.java   select * from dual
C:/test.java   select * from test
C:/test1.java  select * from tester
C:/test1.java  select * from dual

and so on.Right now I have a script to read all the files

  #!bin/ksh

FILE=<FILEPATH to be traversed>
TEMPFILE=<Location of Temp file>
cd $FILE    
for f in `find . ! -type d`; 
do
cat $FILE/addedText.txt>>$TEMPFILE/newFile.txt
cat $f>>$TEMPFILE/newFile.txt
rm $f
cat $TEMPFILE/newFile.txt>>$f
rm $TEMPFILE/newFile.txt
done

I have very little knowledge of awk and sed to proceed further in reading each file and achieve what I want to.Can anyone help me in this

I am using Solaris so only nawk will work.

You can make use either of the below snippet inside your loop.

awk '/select|insert|update/ { _s=_s" "$0; f=1 } f==1{print} /;/ { f=0; } ' < file >sqlfile
# or,
perl -lane 'if (/select|insert|update/){ $str .= $_; $f=1 }print if $f==1;  $f=0 if /;/; ' < file >sqlfile