The Case template appears in the template list when a variable length text field, of type nvarchar or varchar, has been picked in the Transform pane. It allows transforming the case of text to lower, title or upper case.
Case |
Change the case of text,. Allows using a Collation to specify language. Specification of lower, title, or upper case overrides any nocase setting in the Collation.
Launch the template by choosing a text field and then double-clicking the Case template. When the template launches we can specify options.
|
Case : lower |
Change all characters to lower case.
We start with a table that has a varchar text field called Name, which contains a mix of upper and lower case characters. We have used the Layers pane to hide the mfd_id field, for a simpler illustration.
With the focus on the table, in the Transform pane, the Name field is chosen by default (since it is the only field - we could have chosen it if there were other fields). We double-click the Case template to launch it.
In the Case template we choose lower as the Case option.
The Collation choice shows the collation to be used for that language. The default is neutral, nocase, using the default language set by Windows. The nocase setting is ignored for the purpose of setting case.
Clicking the collation picker button allows us to change the collation, to choose from a list of Favorites, and to add and edit Favorite collations.
For the Result destination, we choose New Field, and we enter Lower case name as the name of the new field. Manifold has helpfully offered nvarchar text data type as the default for the new field.
Press Transform.
The template automatically creates a new nvarchar field called Lower case name and populates it with lower case versions of the text in the Name field.
|
Case : title |
Windows style title case: Convert the initial letter of each word in the source field into upper case and convert other characters in the word into lower case, except that words which are already all upper case are left all upper case.
We start with a table that has a varchar text field called Headline, which contains a mix of upper and lower case characters. We have used the Layers pane to hide the mfd_id field, for a simpler illustration.
With the focus on the table, in the Transform pane, the Headline field is chosen by default (since it is the only field - we could have chosen it if there were other fields). We double-click the Case template to launch it.
In the Case template we choose title as the Case option.
The Collation choice shows the collation to be used for that language. The default is neutral, nocase, using the default language set by Windows. The nocase setting is ignored for the purpose of setting case.
Clicking the collation picker button allows us to change the collation, to choose from a list of Favorites, and to add and edit Favorite collations.
For the Result destination, we choose New Field, and we enter Title case headline as the name of the new field. Manifold has helpfully offered nvarchar text data type as the default for the new field.
Press Transform.
The template automatically creates a new nvarchar field called Title case headline and populates it with title case versions of the text in the Headline field.
Windows-style Title Case
Windows-style "title case" as used in Windows system facilities, which Manifold applies, is different than title case as used in most literary styles in English. There are two main differences: First, words already all in capital letters are left all in capital letters. Second, Windows also will capitalize articles, conjunctions and prepositions such as "of" and "the."
Following are some examples showing Windows-style title case using the StringToTitleCase SQL function in the Command Window:
? StringToTitleCase('a walk in the park')
Returns: A Walk In The Park
? StringToTitleCase('a WALK in the park')
Returns: A WALK In The Park
? StringToTitleCase('a waLK iN tHe pARK')
Returns: A Walk In The Park
? StringToTitleCase('A WALK IN THE PARK')
Returns: A WALK IN THE PARK
As can be seen from the above, strings that consist of all upper case characters will not be modified.
To transform such strings into a form where each word is lower case except for an initial capital letter, first use the Case : lower operation to transform the string into all lower case and then apply the Case : title operation.
|
Case : upper |
Change all characters to upper case.
We start with a table that has an nvarchar text field called Country, which contains a mix of upper and lower case characters. We have used the Layers pane to hide the mfd_id field, for a simpler illustration.
With the focus on the table, in the Transform pane, the Country field is chosen by default (since it is the only field - we could have chosen it if there were other fields). We double-click the Case template to launch it.
In the Case template we choose upper as the Case option.
The Collation choice shows the collation to be used for that language. The default is neutral, nocase, using the default language set by Windows. The nocase setting is ignored for the purpose of setting case.
Clicking the collation picker button allows us to change the collation, to choose from a list of Favorites, and to add and edit Favorite collations.
For the Result destination, we choose New Field, and we enter Upper case country as the name of the new field. Manifold has helpfully offered nvarchar text data type as the default for the new field.
Press Transform.
The template automatically creates a new nvarchar field called Upper case country and populates it with upper case versions of the text in the Country field.
|