Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

We have just srarted an effort to move one of our app to sql server from sql anywhere. All my datawindows are failing because the sql for all datawindows has table and column names in double quotes but these double quotes will not work with SQL Sever, SQL server throws an error via odbc as soon as these datawindows are hit, I have hundered of datawindows that I will go in and remove these quotes one at a time, is there some way of searching and replacing these quotes massively? any help will be much appreciated.


asked 13 Feb '12, 10:46

javedrehman's gravatar image

accept rate: 0%

retagged 14 Feb '12, 09:59

Chris%20Keating's gravatar image

Chris Keating

You should not have to do that... SQL Server is perfectly capable of handling "delimited" identifiers; see

Check the ODBC DSN and make sure "Use ANSI quoted identifiers" is checked.

Good luck with all the other problems you're going to have with Transact SQL!

permanent link

answered 13 Feb '12, 11:05

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

Breck: thanks for your reply but the above option in odbc dsn configuration is checked.

(13 Feb '12, 11:12) javedrehman

From the SET QUOTED_IDENTIFIER documentation for MSS (

-- Attempt to create a table with a reserved keyword as a name
-- should fail.
CREATE TABLE "select" ("identity" int IDENTITY, "order" int)


-- Will succeed.
CREATE TABLE "select" ("identity" int IDENTITY, "order" int)

SELECT "identity","order" 
FROM "select"
ORDER BY "order"



So it clear that MSS supports table and column names in quotes.

Please check your DelimitIdentifier DBParm setting. It will override the defaults in MSS and the ODBC driver. If you continue to have problems, you may want to ask this question in a PowerBuilder or MSS focused forum as there will be more users with experience with that combination of software.

permanent link

answered 13 Feb '12, 16:27

Chris%20Keating's gravatar image

Chris Keating
accept rate: 31%

edited 13 Feb '12, 16:28

thank u everybody for your answers, however I was able to fix the problem after spending almost the entire day on it. In DB-Profile Setup under Syntax tab there is an option that allows putting quotes around table and column names. My SQL Anywhere profile had that checked and i did the same for SQL Server profile and it worked great. thanks to everyone. Yes SQL Server itself does not stop you from putting quotes around table and column names.

(13 Feb '12, 16:35) javedrehman

That would map to the DelimitIdentifier DBparm. Look at the connection string in the preview (test connection) tab of the DB Profile.

(13 Feb '12, 16:39) Chris Keating
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 13 Feb '12, 10:46

question was seen: 5,531 times

last updated: 14 Feb '12, 09:59