Catcher ugB BUG CATCHER GAME: Find the error in each slide then hit Enter 1.When you see the bug above click the mouse or hit [Enter]. 2.If you need to go back to a step hit the up arrow key.
SELECT * FROM Employee WHERE FirstName = "James" Answer: Use Single quotes. SELECT * FROM Employee WHERE FirstName = 'James' Bug Catcher 1
SELECT * WHERE City = 'Nantucket' FROM Employee Answer: WHERE clause comes after the FROM clause. SELECT * FROM Employee WHERE City = 'Nantucket' Bug Catcher 2
SELECT * FROM Employee WHERE FirstName LIKE '%'T Answer: Both wildcard and characters go inside the quotes. SELECT * FROM Employee WHERE FirstName LIKE '%T' Bug Catcher 3
SELECT * FROM Employee WHERE FirstName = '%T' Answer: Use LIKE with a wildcard (not an equal sign). SELECT * FROM Employee WHERE FirstName LIKE '%T' Bug Catcher 4
--Trying to find Grants with percent in the name. SELECT * FROM [Grant] WHERE GrantName LIKE '%%' Answer: To make wildcards literal you must enclose in []. SELECT * FROM [Grant] WHERE GrantName LIKE '%[%]%' Bug Catcher 5
--Trying to find all Celtic names. SELECT * FROM [Grant] WHERE GrantName LIKE '%'%' Answer: Need to precede the single quote with another single quote. SELECT * FROM [Grant] WHERE GrantName LIKE '%''%' Bug Catcher 6
--Find all.gov addresses SELECT * FROM [Grant] WHERE GrantName LIKE Answer: To specify 1 or more spaces, you need an underscore and a percentage sign. SELECT * FROM [Grant] WHERE GrantName LIKE Bug Catcher 7
--Find all.gov addresses SELECT * FROM [Grant] WHERE GrantName LIKE Answer: Literal sequences of characters should not be in square brackets. SELECT * FROM [Grant] WHERE GrantName LIKE Bug Catcher 8
I know my JProCo Database has an Employee table. Why am I getting this error message? Answer: Change your database context to JProCo. Bug Catcher 9