Which code segment should you execute?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B Explanation
Explanation/Reference: QUESTION 2
You need to create the InvoiceStatus table in DB1.
How should you define the InvoiceID column in the CREATE TABLE statement?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: C Explanation
Explanation/Reference:
QUESTION 3
Which data type should you use for CustomerID?
A. varchar(11)
B. bigint
C. nvarchar(11)
D. char(11)
Correct Answer: D Explanation
Explanation/Reference:
Explanation: Invoices.xml All customer IDs are 11 digits. The first three digits of a customer ID represent the customer’s country. The remaining eight digits are the customer’s account number. int: -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647) (just 10 digits max) bigint: -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807) http://msdn.microsoft.com/en-us/library/ms176089.aspx http://msdn.microsoft.com/en-us/library/ms187745.aspx
QUESTION 4
You need to modify InsertInvoice to comply with the application requirements.
Which code segment should you execute?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D Explanation Explanation/Reference:
QUESTION 5
You attempt to process an invoice by using usp_InsertInvoice.sql and you receive the following error message: “Msg 515, Level 16, State 2, Procedure usp_InsertInvoice, Line 10 Cannot insert the value NULL into column ‘InvoiceDate’, table ‘DB1.Accounting.Invoices’; column does not allow nulls. INSERT fails.” You need to modify usp_InsertInvoice.sql to resolve the error.
How should you modify the INSERT statement?
A. InvoiceDate varchar(l00) ‘InvoiceDate’,
B. InvoiceDate varchar(100) ‘Customer/InvoiceDate’, ‘
C. InvoiceDate date ‘@InvoiceDate’,
D. InvoiceDate date ‘Customer/@InvoiceDate’,
Correct Answer: C Explanation Explanation/Reference:
QUESTION 6
You need to modify the function in CountryFromID.sql to ensure that the country name is returned instead of the country ID. Which line of code should you modify in CountryFromID.sql?
A. 04
B. 05
C. 06
D. 19
Correct Answer: D Explanation Explanation/Reference:
Explanation: http://msdn.microsoft.com/en-us/library/ms186755.aspx http://msdn.microsoft.com/en-us/library/ms191320.aspx
QUESTION 7
You execute IndexManagement.sql and you receive the following error message:
“Msg 512, Level 16, State 1, Line 12
Subquery returned more than 1 value. This is not permitted when the subquery follows =,! =, <, <= ,>, > = or when the subquery is used as an expression.”
You need to ensure that IndexManagement.sql executes properly.
Which WHILE statement should you use at line 18?
A. WHILE SUM(@RowNumber) < (SELECT @counter FROM @indextable)
B. WHILE @counter < (SELECT COUNT(RowNumber) FROM @indextable)
C. WHILE COUNT(@RowNumber) < (SELECT @counter FROM @indextable)
D. WHILE @counter < (SELECT SUM(RowNumber) FROM @indextabie) Correct Answer: B
Explanation Explanation/Reference:
QUESTION 8
You need to convert the functionality of Legacy.sql to use a stored procedure. Which code segment should the stored procedure contain?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D Explanation
Explanation/Reference:
Explanation: http://msdn.microsoft.com/en-us/library/ms187926.aspx http://msdn.microsoft.com/en-us/library/ms190782.aspx http://msdn.microsoft.com/en-us/library/bb669091.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms709342.aspx http://msdn.microsoft.com/en-us/library/ms188001.aspx
QUESTION 9
You need to create a function that filters invoices by CustomerID. The SELECT statement for the function is contained in InvoicesByCustomer.sql.
Which code segment should you use to complete the function?
A. Option A
B. Option B
C. Option C
D. Option D