Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1

2 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.

3 SELECT * FROM Employee WHERE FirstName = "James" Answer: Use Single quotes. SELECT * FROM Employee WHERE FirstName = 'James' Bug Catcher 1

4 SELECT * WHERE City = 'Nantucket' FROM Employee Answer: WHERE clause comes after the FROM clause. SELECT * FROM Employee WHERE City = 'Nantucket' Bug Catcher 2

5 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

6 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

7 --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

8 --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

9 --Find all.gov e-mail addresses SELECT * FROM [Grant] WHERE GrantName LIKE '_%@_.gov' Answer: To specify 1 or more spaces, you need an underscore and a percentage sign. SELECT * FROM [Grant] WHERE GrantName LIKE '_%@_%.gov' Bug Catcher 7

10 --Find all.gov e-mail addresses SELECT * FROM [Grant] WHERE GrantName LIKE '_%@_%[.gov]' Answer: Literal sequences of characters should not be in square brackets. SELECT * FROM [Grant] WHERE GrantName LIKE '_%@_%.gov' Bug Catcher 8

11 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


Download ppt "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."

Similar presentations


Ads by Google