Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Works in MySQL but not SQL Server
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01431281
Message ID:
01431300
Views:
49
>I am horsing around with SQL code tonight and thought I'd try some "stuff", but this code didn't work in SQL Server 2005, but does in MySQL:
>
>What did I do wrong? Is it the two single quotes in the word "don't"?
>
>Here's the SELECT statement:
>
>
>use AdventureWorks
>insert into dbo.Album
>(name, track, duration)
>values
>('Abbey Road', 'Don''t Let me Down', 249)
>
There is no Album table in AdventureWorks database. Is it a table you created there?

This code
use AdventureWorks
declare @Album table (Name varchar(30), Track varchar(100), Duration numeric(10,3))
insert into @Album
(name, track, duration)
values
('Abbey Road', 'Don''t Let me Down', 249)
works just fine.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform