Well, there are numerous flaws in the code that you posted. :'s are not comment characters like the ;'s are. Also not sure what you are trying to do with the line that is just $NY=LCASE ...Also missing the SELECT statement before the case statements. Honestly I have no idea what you're trying to do in there.