Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread ALTER DATABASE
Fri, May 21 2010 5:58 AMPermanent Link

Aaron Christiansen

Why is it that the database name is surrounded by double quotes and every other parameter must use single quotes?
Fri, May 21 2010 6:31 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Aaron

>Why is it that the database name is surrounded by double quotes and every other parameter must use single quotes?

You'll find it isn't only ALTER DATABASE that has that. DBISAM, if I remember correctly, went down the same path in the later versions. I think its that data is surrounded by a single quote and system objects (eg table names, column names, database names etc) are surrounded by a double quote.

Also you only need the double quotes if there is a special character in the name (eg a space)

Can't remember if Tim ever explained the underlying logic / reason for it.

Roy Lambert [Team Elevate]
Fri, May 21 2010 3:25 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Aaron,

<< Why is it that the database name is surrounded by double quotes and every
other parameter must use single quotes? >>

All ElevateDB object identifiers are referenced with double-quotes (if
necessary).   String constants are specified with single quotes.

It's the context in the SQL statement that matters.  Any time an identifier
is required:

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Identifiers

it should be enclosed in double-quotes if it matches a reserved word or
contains characters like spaces that would cause an error in the parsing if
the identifier was not enclosed in double-quotes.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image