Using Expressions in PS Query

From TekiWiki

Jump to: navigation, search

This whole wiki has now moved to http://www.springboardsolutions.com/wiki

Go to this page Using Expressions in PS Query

Line 19: Line 19:
'''Examples'''
'''Examples'''
:Substr(A.DESCR,3) - The description without the first three characters
:Substr(A.DESCR,3) - The description without the first three characters
 +
 +
===Function: Translate ===
 +
'''Usage: translate(A.DESCR,'List1','List2') '''
 +
'''Usage: translate(A.DESCR,'X1234567890','X') '''
 +
Translates characters in the column found in first list with corresponding character in the second list.
 +
 +
'''Examples'''
 +
:translate(NATIONAL_ID,
 +
'0123456789'||'abcdefghijklmnopqrstuvwxyz'||'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 +
,rpad('9',10)||rpad('x',26)||rpad('X',26))
 +
Shows the format of NATIONAL_ID - useful in a group by query
 +
 +
:translate(TextField,'-0123456789','-') - Removes digits from text field.

Revision as of 23:45, 24 March 2011

Personal tools