Concatenating Fields

To demonstrate working with calculated fields, let's start with a simple example—the mailing address.

The Vendors table contains vendor name and address information. Imagine that you are sending out a mailing to all your vendors and that you are printing labels using a report you have created. The label report requires three lines of text—the vendor name and two address lines.

The SELECT statement that returns all the vendor names is simple enough, but how would you create the second address line? The label application wants a single value, and the data in the table is stored in three columns: vend_city, vend_state, and vend_zip.

Note

Concatenate Joining values together (by appending them to each other) to form a single ...

Get Sams Teach Yourself SQL in 10 Minutes now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.