• The SQL statement that you are using in the screen shot that causes the runtime error is different from the statement that you wrote in the original question. In the original question, you used square brackets and in the screen shot you didn't ([stoplist] vs. stoplist). That makes a big difference because the square brackets should let you use none standard names and prevent an error message. Do you still get an error when you use the square brackets?

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/