Renaming Columns

Renaming the column headings will make them clearer and more meaningful to users when they generate the report.

1.  Revise your “Clients Born Before Date” query to look like this:

SELECT tblClient.colClientID, tblClient.colFirstName, tblClient.colLastName, tblClient.colDateofBirth

FROM
tblClient

WHERE colDateOfBirth < @StartDate

2.  Select the Preview button to preview the results:

While the column names in this particular query are mostly self-explanatory, they could be cleaned up a bit.

3.  Close the query preview page to return to the query-building page, and revise your query to look like this:

SELECT tblClient.colClientID AS [Client ID], tblClient.colFirstName AS [First Name], tblClient.colLastName AS [Last Name], tblClient.colDateofBirth AS [Date of Birth]

FROM
tblClient

WHERE colDateOfBirth < @StartDate

4.  Select the Preview button to preview the results:

The revised column names are much more appropriate for the custom report that users will generate.

Close the query preview page, and close the custom report query file.  Continue to “Eliminating Duplicate Rows” to learn how to eliminate duplicate rows from your query.