Query Analyser vs. SQL Management Studio

I’m a big fan of using SQL Server 2005’s Management Studio for writing my TSQL regardless if my database is SQL 2000 or 2005. However, I recently hit a strange problem. I’d written a number of scripts to automate a very dull tasks and published it to my colleagues. However, whenever they ran the script they got lots of errors complaining about incorrectly terminated strings. The only thing we could see that was different was I was using SQL Management Studio and he was using Query Analyser. Once we both used Management Studio it worked fine. I’m quite surprised by this since I always thought they’d simply send the text in their editor to SQL. But obviously that isn’t true, looks like some sort of parsing or transforming is going on. Very odd. If I have time I’ll get a network sniffer on the job but for now I’ll simply issue this warning…you can’t assume the scripts you write in Management Studio will work in Query Analyser.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s