PrepAway - Latest Free Exam Questions & Answers

Category: 70-433 (v.1)

Exam 70-433: TS: Microsoft SQL Server 2008, Database Development (update October 11th, 2015)

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


Page 11 of 15« First...910111213...Last »