Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
Msg 102, Level 15, State 1, Line 7Hello! As a bot, I'm happy to assist you with your SQL error. However, I would need more information about the specific error you're encountering in order to provide a detailed response. Could you please provide me with the exact error message you are receiving, as well as the SQL query that is causing the error? With this information, I will be better equipped to provide you with a solution to your problem.
Based on the error message you provided, it seems like there is a syntax error in your SQL query. The semicolon ( symbol is not used in SQL Server to terminate statements like it is in other programming languages like C++.Msg 102, Level 15, State 1, Line 7
Incorrect syntax near ';'.
Msg 102, Level 15, State 1, Line 8
Incorrect syntax near ';'.
Msg 102, Level 15, State 1, Line 9
Incorrect syntax near ';'.
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near ';'.
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near ';'.
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near ';'.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near ';'.
Msg 102, Level 15, State 1, Line 14
Incorrect syntax near ';'.
INSERT INTO StudentGrade ('COSC1003', 'Data Structures and Algorithms', 3, 1.25);Based on the error message you provided, it seems like there is a syntax error in your SQL query. The semicolon ( symbol is not used in SQL Server to terminate statements like it is in other programming languages like C++.
To resolve the error, you need to review your SQL query and remove the semicolons at the end of each line. You should only use semicolons in a few specific cases, such as when you're executing multiple statements in a single batch or when you're using certain SQL Server features like Common Table Expressions (CTEs).
If you could provide me with the SQL query you're trying to execute, I could take a closer look and provide more specific guidance on how to fix the syntax error.
Thank you for providing the SQL query. The error in your SQL query is due to the fact that you are enclosing the column values in single quotes. You should only use single quotes to enclose string values, not column names or numeric values.INSERT INTO StudentGrade ('COSC1003', 'Data Structures and Algorithms', 3, 1.25);
INSERT INTO StudentGrade ('GEDC1006 ', 'Readings in Philippine History', 3, 2.25);
INSERT INTO StudentGrade ('PHED1003', 'Physical Education 3', 3, 1.25);
INSERT INTO StudentGrade ('GEDC1014', 'Rizal’s Life and Works', 3, 1.50);
INSERT INTO StudentGrade ('COSC1007', 'Human-Computer Interaction', 3, 1.50);
INSERT INTO StudentGrade ('INTE1044', 'Object-Oriented Programming', 3, 1.75);
INSERT INTO StudentGrade ('COSC1001', 'Principles of Communication ', 3, 2.25);
INSERT INTO StudentGrade ('COSC1008', 'Platform Technology', 3, 1.50);
INSERT INTO StudentGrade (CourseCode, CourseTitle, Units, Grade)
VALUES ('COSC1003', 'Data Structures and Algorithms', 3, 1.25);
INSERT INTO StudentGrade (CourseCode, CourseTitle, Units, Grade)
VALUES ('GEDC1006', 'Readings in Philippine History', 3, 2.25);
INSERT INTO StudentGrade (CourseCode, CourseTitle, Units, Grade)
VALUES ('PHED1003', 'Physical Education 3', 3, 1.25);
INSERT INTO StudentGrade (CourseCode, CourseTitle, Units, Grade)
VALUES ('GEDC1014', 'Rizal’s Life and Works', 3, 1.50);
INSERT INTO StudentGrade (CourseCode, CourseTitle, Units, Grade)
VALUES ('COSC1007', 'Human-Computer Interaction', 3, 1.50);
INSERT INTO StudentGrade (CourseCode, CourseTitle, Units, Grade)
VALUES ('INTE1044', 'Object-Oriented Programming', 3, 1.75);
INSERT INTO StudentGrade (CourseCode, CourseTitle, Units, Grade)
VALUES ('COSC1001', 'Principles of Communication', 3, 2.25);
INSERT INTO StudentGrade (CourseCode, CourseTitle, Units, Grade)
VALUES ('COSC1008', 'Platform Technology', 3, 1.50);
INSERT INTO
statement.