Chapter10code.sql does not execute?
Below is the error message I recieve when trying to run the code from the Chapter10code.sql?
What do I need to do to run this code?
Msg 321, Level 15, State 1, Procedure CustomerPhoneList_vw, Line 5
"s" is not a recognized table hints option. If it is intended as a parameter to a table-valued function, ensure that your database compatibility mode is set to 90.
Msg 154, Level 15, State 1, Procedure CustomerPhoneList_vw, Line 11
a USE database statement is not allowed in a procedure, function or trigger.
Msg 156, Level 15, State 1, Procedure Employees_vw, Line 13
Incorrect syntax near the keyword 'SELECT'.
Msg 111, Level 15, State 1, Procedure Employees_vw, Line 15
'CREATE VIEW' must be the first statement in a query batch.
Msg 102, Level 15, State 1, Procedure Employees_vw, Line 32
Incorrect syntax near 'FirstName'.
Msg 154, Level 15, State 1, Procedure Employees_vw, Line 39
a USE database statement is not allowed in a procedure, function or trigger.
Msg 156, Level 15, State 1, Procedure CustomerOrders_vw, Line 19
Incorrect syntax near the keyword 'SELECT'.
Msg 154, Level 15, State 1, Procedure CustomerOrders_vw, Line 25
a USE database statement is not allowed in a procedure, function or trigger.
Msg 156, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 21
Incorrect syntax near the keyword 'USE'.
Msg 154, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 21
a USE database statement is not allowed in a procedure, function or trigger.
Msg 111, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 39
'CREATE VIEW' must be the first statement in a query batch.
Msg 102, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 48
Incorrect syntax near 'WITH'.
Msg 102, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 57
Incorrect syntax near '1'.
Msg 111, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 75
'ALTER VIEW' must be the first statement in a query batch.
Msg 319, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 76
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
Msg 111, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 100
'ALTER VIEW' must be the first statement in a query batch.
Msg 319, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 101
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
Msg 154, Level 15, State 1, Procedure YesterdaysOrders_vw, Line 122
a USE database statement is not allowed in a procedure, function or trigger.
Msg 207, Level 16, State 1, Procedure CustomerOrders_vw, Line 13
Invalid column name 'CustomerID'.
Msg 207, Level 16, State 1, Procedure CustomerOrders_vw, Line 13
Invalid column name 'CustomerID'.
Msg 208, Level 16, State 1, Procedure CustomerOrders_vw, Line 13
Invalid object name 'dbo.Order Details'.
Msg 911, Level 16, State 1, Line 5
Could not locate entry in sysdatabases for database 'NorthwindBulk'. No entry found with that name. Make sure that the name is entered correctly.
|