Double Quotes Fail, Single Succeed

From: RGondzur (rgondzur_at_NO_SPAM_aicsoft.com)
Date: 03/18/04


Date: Thu, 18 Mar 2004 13:50:37 -0500


I am trying to run the script that came with the .Net SDK to install their
sample databases on SQL Server 2000 instead of MSDE.

The Categories table has the following column definitions:

CREATE TABLE [dbo].[Categories] (
 [CategoryID] [int] NULL ,
 [CategoryName] [nvarchar] (75) NULL
) ON [PRIMARY]

Using the following statement from their script :

INSERT INTO Categories (CategoryID,CategoryName) VALUES (3,"Soda")

Gives the following error:

The name 'Soda' is not permitted in this context. Only constants,
expressions, or variables allowed here. Column names are not permitted.

If I change the double quotes around Soda to single quotes, then the
statement succeeds.

1. Why are double quotes not acceptable?

2. I thought the MSDE app was very close to SQL Server in support. If this
script is written for MSDE, why does it fail on SQL?

Thanks



Relevant Pages

  • MSDE/SQL Checker Tool
    ... MSDE applications. ... SQL Slammer Check is used to query the SQL Server and MSDE configuration on ... This tool can be wrapped inside of a logon script, ... started before you apply the security patch found in Q316333 or SP3. ...
    (microsoft.public.sqlserver.security)
  • MSDE/SQL Checker Tool
    ... MSDE applications. ... SQL Slammer Check is used to query the SQL Server and MSDE configuration on ... This tool can be wrapped inside of a logon script, ... started before you apply the security patch found in Q316333 or SP3. ...
    (microsoft.public.security)
  • Re: DtS task to remove quotes
    ... >I have a script to remove double quotes in my table, ... How can I overcome or skip over the identity column ... global community for SQL Server professionals ...
    (microsoft.public.sqlserver.dts)
  • MSDE merge Replication
    ... Perhaps I'm misunderstanding you but creating a publisher ... version of SQL Server. ... MSDE doesn't come with graphical ... and modify the servernames then run the script on the MSDE ...
    (microsoft.public.sqlserver.replication)
  • Re: Double Quotes Fail, Single Succeed
    ... quotes around your strings. ... Tibor Karaszi, SQL Server MVP ... >> I am trying to run the script that came with the .Net SDK to install ... I thought the MSDE app was very close to SQL Server in support. ...
    (microsoft.public.sqlserver.programming)

Loading