Was this helpful?
Examples of Varchar Templates
The following table shows some examples of varchar templates:
Example
Description
nnn\-nn\-nnnn
This template, with embedded dashes, lets the end user enter 9 digits, for example, for a Social Security number.
AA\-nnnn
This template specifies two mandatory alphabetic characters and four digits, a dash separating the alphabetic and numeric characters.
nn\%
This template specifies two digits and places a percent sign following the digits.
[e/u][x/u]nnnn
\-[#//0][#//0]
This templates specifies that the end user enter an “e” and “x” in the first and second positions, respectively, followed by four digits and then two more digits. The template forces uppercase on the first two positions, inserts zeros by default in the last two positions if the end user makes no entries in those positions, and puts a dash before the final two positions.
N\='[ja-m/l]jjj\'
This template specifies a five-character entry. The first position is a digit and is a mandatory entry. The final four positions can be any character between “a” and “m,” inclusive. The final four positions are set off by single quotation marks and are forced to lowercase.
 
Last modified date: 06/25/2024