Double Quotes Fail, Single Succeed
From: RGondzur (rgondzur_at_NO_SPAM_aicsoft.com)
Date: 03/18/04
- Next message: Eddie: "Re: calling sproc accross linked server is slooow"
- Previous message: Tibor Karaszi: "Re: SQL Server log file show 'login succeeded for use sa' more than 1000 times"
- Next in thread: Adam Machanic: "Re: Double Quotes Fail, Single Succeed"
- Reply: Adam Machanic: "Re: Double Quotes Fail, Single Succeed"
- Reply: Partha Mandayam: "Re: Double Quotes Fail, Single Succeed"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Eddie: "Re: calling sproc accross linked server is slooow"
- Previous message: Tibor Karaszi: "Re: SQL Server log file show 'login succeeded for use sa' more than 1000 times"
- Next in thread: Adam Machanic: "Re: Double Quotes Fail, Single Succeed"
- Reply: Adam Machanic: "Re: Double Quotes Fail, Single Succeed"
- Reply: Partha Mandayam: "Re: Double Quotes Fail, Single Succeed"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|