I have a program in which I create and populate a SQL Server 7.0 table from a flat text file. I use a format file and the bcp utility.

My problem occurs when I have a field name that is also a Reserved Word. I have no problem creating the table with the Reserved Word (SQL just puts brackets ([reserved word]) around it. When I run the bcp from the command line, it fails. When I run the bcp from the Query Analyzer, there are not any problems. Both ways use the same format file. Why does it work when I use the Query Analyzer? Is there any way for me to force the bcp to work from the command line when there is a Reserved Word involved?