user1000197
user1000197

Reputation: 13

PROBLEMS WITH SQL

USE Kudler_FF
INSERT INTO Job_Tbl
    (JobTitle, JobDescription, ExemptionStatus)
VALUES
   ('Accounting clerk’, ‘Computes, classifies, records, and verifies numerical
   data for use in maintaining accounting records’, ‘N);

Msg 105, Level 15, State 1, Line 5 Unclosed quotation mark after the character string 'Accounting clerk’, ‘Computes, classifies, records, and verifies numerical data for use in maintaining accounting records’, ‘N); '. Msg 102, Level 15, State 1, Line 5 Incorrect syntax near 'Accounting clerk’, ‘Computes, classifies, records, and verifies numerical data for use in maintaining accounting records’, ‘N'.

WHAT AM I DOING WRONG?

Upvotes: 1

Views: 62

Answers (2)

Professor Falken
Professor Falken

Reputation: 1087

You're just missing the closing quote (') after the 'N in your last value... It should read:

USE Kudler_FF INSERT INTO Job_Tbl (JobTitle, JobDescription, ExemptionStatus) VALUES ('Accounting clerk', 'Computes, classifies, records, and verifies numerical data for use in maintaining accounting records', 'N');

Also as noted above, make sure you're using a forward apostrophe only (', under the " key) and not the open and closing quotes. The error message you pasted though is about the missing quote after the N, so I think StackOverflow might have put those in via its editor.

Upvotes: 1

Abe Miessler
Abe Miessler

Reputation: 85126

You have left and right ticks here:

clerk’, ‘Computes,

And in a bunch of other spots in your code.

SQL no likey. Try replacing with a regular apostrophe (' not or )

This will sometimes happen if you copy and past from Word or something like that that tries to do fancy formatting.

Upvotes: 2

Related Questions