DRAG DROP
You create a view based on the following statement:
You grant the Select permission to User1 for this view. You need to change the view so that it
displays only the records that were processed in the month prior to the current month. You need to
ensure that after the changes, the view functions correctly for User1. Which four Transact-SQL
statements should you use? (To answer, move the appropriate SQL statements from the list of
statements to the answer area and arrange them in the correct order.)

Explanation:
http://msdn.microsoft.com/en-us/library/hh213020.aspx
http://msdn.microsoft.com/en-us/library/ms186819.aspx
http://msdn.microsoft.com/en-us/library/ms173846.aspx
I think the answetr is wrong. The last part of the answer should be:
WHERE b.ProcessDate >= dateadd(d,1,EOMONTH(GETDATE(),-2))
AND b.ProcessDate EOMONTH(GETDATE(),-2)) = 05.31.2016
=> dateadd(d,1,EOMONTH(GETDATE(),-2)) = 06.01.2016
THE AND PART evaluates to:
(GETDATE(),-1)) = 06.19.2016
=> EOMONTH(GETDATE(),-1)) = 06.30.2016
=> dateadd(d,1,EOMONTH(GETDATE(),-1)) = 07.01.2016
Therefore:
WHERE b.ProcessDate >= 06.01.2016 AND < 07.01.2016
1
0
I dont think this is 462 question. It is also in 461
http://www.aiotestking.com/microsoft/which-four-transact-sql-statements-should-you-use-5/
This 70-462 is about Administering Microsoft SQL Server 2012 Databases.
Querying should not be here. I’v seen a few questions of 461 here.
0
0
70-461 question….
0
0