>It's valid query with valid WHERE clause. What's actual query and what error do you get?
>
I thought it was a valid WHERE. And I have used it before. The problem turned out to be that I had WHERE after ORDER clause. In VFP it never caused any problems and then I remembered that SQL Server is more stringent about the order of these clauses. So putting the clauses in proper order solved the problem.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham