PrepAway - Latest Free Exam Questions & Answers

What should you do?

You work in Dublin at the main office of Domain.com. You are responsible for managing a SQL Server 2005 database. The sales department wants a report that compares customer activity in the previous quarter between the main office in Dublin and the branch office in Buenos Aires. They want the data sorted by surname and first name. You restore a recent backup of the Buenos Aires database onto your server. You write queries to build the report, ordering the data by the Surname and FirstName columns. You review the data and notice that the customer list from the Buenos Aires database is sorted differently. The sales department needs the revised data within 15 minutes for a presentation.
You need to implement the fastest possible solution that ensures that the data from both databases is sorted identically. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Use the Copy Database Wizard to copy the data in the Buenos Aires database to a new database with the same collation as the Dublin database.

B.
Use the SQL Server Import and Export Wizard to copy the data from the Buenos Aires database into new tables, specifying the same collation as the Dublin database.

C.
Modify the format file to specify the same collation as the Dublin database. Import the table again.

D.
Modify the query on the Buenos Aires database to use the COLLATE setting in the ORDER BY clause. In the query, specify the same collation as the Dublin database.

Explanation:
COLLATE {collation_name}
Specifies that the ORDER BY operation should be performed according to the collation specified in collation_name, and not according to the collation of the column as defined in the table or view. collation_name can be either a Windows collation name or a SQL collation name. COLLATE is applicable only for columns of the char, varchar, nchar, and nvarchar data types.


Leave a Reply