Yes, DontWriteLongLines (←click).
It makes your thread very hard to read, which is likely to put people off from responding. I'd correct it myself, but there's quite a lot to be done.
Use the 'Edit' button and break that "SELECT" String up and cool your indenting a bit. You'll be amazed how much easier it is to read.
Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here