Which method should you use?
A database contains tables named Sales and SalesArchive. SalesArchive contains historical sales
dat
a. You configure Change Tracking on the Sales table. The minimum valid version of the Sales table is
10.
You need to write a query to export only sales data that changed since version 10, including the
primary
key of deleted rows. Which method should you use?
Which TransactSQL statement should you use?
You are required to modify a table named Sales.SalesOrder. The table has change tracking enabled
on it.
You need to disable change tracking prior to modifying the Sales.SalesOrder table.
Which TransactSQL
statement should you use?
Which function should you use?
You have implemented change tracking on a table named Sales.SalesOrder.
You need to determine all columns that have changed since the minimum valid version.
Which function should you use?
Which query should you use?
You have two tables named Customers and Orders. They are related by a foreign key constraint on
the CustomerID on each table. You need to generate the following XML structure that includes all
customers and their related orders. <Root>
<Customer>
<CustomerName>Customer1</CustomerName>
<Orders>
<Order><OrderDate>1/1/2008</OrderDate><OrderValue>422</OrderValue></Order>
<Order><OrderDate>4/8/2008</OrderDate><OrderValue>300</OrderValue></Order>
…
</Orders>
…
</Customer>
<Root>
Which query should you use?
Which query should you use?
You need to generate the following XML document.
<ProductExport>
<Product Price=”99″>Product1</Product>
<Product Price=”199″>Product2</Product>
<Product Price=”299″>Product3</Product>
<Product Price=”399″>Product4</Product>
</ProductExport>
Which query should you use?
Which FOR XML statement should you use?
Your company’s database contains Customers and Orders tables.
You have been tasked to write a SELECT statement that outputs customer and order data as a valid
and
wellformed
XML document. You are required to mix attribute and element based XML within the
document. You have determined that using the FOR XML AUTO clause will not be suitable.
You need to identify the correct FOR XML clause to meet the requirement.
Which FOR XML statement should you use? (Each correct answer represents a complete solution.
Choose two.)
Which TransactSQL statement should you use?
Your company’s database contains Customers and Orders tables.
You have been tasked to write a SELECT statement that exposes the data as a valid and wellformed
XML document. The XML data must be attributebased,
and the order data XML must be nested in the
customer data XML.
You need to write a SELECT statement to meet the requirements.
Which TransactSQL
statement should you use?
Which query should you use?
You have a table named Customer that has an XML column named Locations. This column stores an
XML fragment that contains details of one or more locations, as show in the following examples.
<Location City=”Sydney” Address=”…” PhoneNumber=”…” />
<Location City=”Chicago” Address=”…” PhoneNumber=”…” />
<Location City=”London” Address=”…” PhoneNumber=”…” />
You need to write a query that returns a row for each of the customer’s locations. Each resulting row
must
include the customer name, city, and an XML fragment that contains the location details. Which
query
should you use?
Which TransactSQL statement should you use?
Click the Exhibit button.
You have the following XML:
<Site URL=”http://www.contoso.com/index.htm”>
<Site URL=”http://www.contoso.com/finance/index.htm”>
<Site URL=”http://www.contoso.com/finance/reports/index.htm” />
<Site URL=”http://www.contoso.com/finance/main/index.htm” />
</Site>
<Site URL=”http://www.contoso.com/marketing/index.htm”>
<Site URL=”http://www.contoso.com/marketing/reports/index.htm” />
<Site URL=”http://www.contoso.com/marketing/main/index.htm” />
</Site>
<Site URL=”http://www.contoso.com/sales/index.htm” />
</Site>
You are tasked to query the sites listed in the XML by using OPENXML. The results will have two
columns,
ParentSiteURL and SiteURL. The ParentSiteURL column should contain the URL attribute of the
parent
site. The SiteURL column should contain the URL attribute of the site itself.
The output should look like that in the exhibit.
You need to write the OPENXML query.
Which TransactSQL
statement should you use?
Which TransactSQL statement should you use?
Your company uses an application that passes XML to the database server by using stored
procedures.
The database server has a large number of XML handles that are currently active. You determine
that the
XML is not being flushed from SQL Server memory.
You need to identify the system stored procedure to flush the XML from memory.
Which TransactSQL
statement should you use?