Groups | Blog | Home
all groups > sql server (alternate) > june 2004 >

sql server (alternate) : Help: MS-Word apostrophes in Query Analyzer


John Bell
6/30/2004 12:37:30 PM
Hi

If this is passed to a stored procedure then you could try the REPLACE
function to alter the affending characters? If you want to insert the
correct character the try Insert/Symbol from the menus and choose ascii
character 27. You could set up a shortcut to do this.

John

[quoted text, click to view]

Poster
6/30/2004 6:26:52 PM
After creating an IN clause from a bunch of character strings created by a
Word macro, Query Analyzer complains about a syntax error. The macro takes a
column full of character strings and wraps apostrophes (single-quotes)
around each string and adds a comma to the end of each line, ready to paste
into a Query Analyzer session. The problem is that Query Analyzer doesn't
recognize the MS-Word apostrophes. It has nothing to do with the standard
apostrophe/quote problems that some people face when dealing with embedded
quotes.

Can anyone suggest how to produce single-quote characters in MS-Word that
Query Analyzer understands?

Thank you.

Erland Sommarskog
6/30/2004 10:11:46 PM
Poster (Poster@hotmail.com) writes:
[quoted text, click to view]

As John said, you need to run a Search/Replace somewhere to fix those
"smart" quotes. The best place is probably in the Word macro...

You can also tell Word not to use "smart quotes". ToolS->AutoCorrect
and then the AutoFormat tab, uncheck '"Straight qutoes" with "smart
quotes"'.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
AddThis Social Bookmark Button