Arvind
Arvind

Reputation: 6474

sql azure beginner- getting error for an simple insert statement

I am trying to insert a row of data into a table in SQL Azure --

This is the insert statement--

INSERT INTO cloud_storage_credentials (cloud_provider,api_key, api_secret)
VALUES("Rackspace", "<random_value>", "<random_value>");

However I am getting the following error--

Msg 207, Level 16, State 1, Line 2
Invalid column name 'Rackspace'.
Msg 207, Level 16, State 1, Line 2
Invalid column name '<random_value>'.
Msg 207, Level 16, State 1, Line 2
Invalid column name '<random_value>'.

What am I doing wrong here? I followed an SQL Server tutorial to write the above query...

Upvotes: 2

Views: 1123

Answers (2)

Lamak
Lamak

Reputation: 70668

Change your "s with 's. As it is, it thinks that the values you are inserting are name of columns.

Upvotes: 1

SQLMenace
SQLMenace

Reputation: 135111

change the " (double quotes) to ' (tick/single quote)

INSERT INTO cloud_storage_credentials (cloud_provider,api_key, api_secret)
VALUES('Rackspace', '<random_value>', '<random_value>');

Upvotes: 2

Related Questions