Training Tips

[Skip Global Navigation]

Training

Training Home

SPSS Trainer Tip: ShowCase® Query™, ShowCase Report Writer™, and ShowCase Warehouse Builder™

Instructor profile

Name: Jane Black Eagle

About Jane: Jane, a senior solutions consultant, has worked for SPSS since 1997. She has successfully helped numerous SPSS customers solve their business problems through the successful implementation of SPSS products. Jane holds both a BA in business administration and a BS in information systems.

Save time and effort by using the translate function

When working with ShowCase Query, ShowCase Report Writer, or ShowCase Warehouse Builder, you can use the translate function to convert any instance of a character or characters in the field to another character or characters. The translate function automatically replaces all instances of single or multiple characters.

The syntax for the translate function is TRANSLATE(fieldname, 'result char', 'char to replace')

For example, TRANSLATE(CUSTNAME, ' ', '-') -> replaces all occurrences of "-" in the field CUSTNAME by a BLANK.

Here’s how your data might appear before you use the translate function:


In the screenshot below, you can see how the translate function creates an expression in ShowCase Query:clip

Here are the results:

The translate function is very powerful because it can replace any value or values in a string using a single function. You can save time and effort with the translate function—and make your reports more readable and your data more useful.

We offer SPSS courses at locations around the world.
Find a course in the location nearest to you.