Using Expressions in PS Query
From TekiWiki
This whole wiki has now moved to http://www.springboardsolutions.com/wiki
Go to this page Using Expressions in PS Query
| Line 10: | Line 10: | ||
'''Examples''' | '''Examples''' | ||
<pre> | <pre> | ||
| - | 'PS_' || A.RECNAME | + | 'PS_' || A.RECNAME /* Gives the standard table name from the record name. */ |
</pre> | </pre> | ||
| - | + | ||
| Line 26: | Line 26: | ||
'''Examples''' | '''Examples''' | ||
<pre> | <pre> | ||
| - | Substr(A.DESCR,3) | + | Substr(A.DESCR,3) /* The description without the first three characters */ |
</pre> | </pre> | ||
| Line 42: | Line 42: | ||
translate(NATIONAL_ID, | translate(NATIONAL_ID, | ||
'0123456789' ||'abcdefghijklmnopqrstuvwxyz'||'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | '0123456789' ||'abcdefghijklmnopqrstuvwxyz'||'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | ||
| - | ,rpad('9',10)||rpad('x',26) ||rpad('X',26)) | + | ,rpad('9',10)||rpad('x',26) ||rpad('X',26)) /* Format of NATIONAL_ID */ |
| - | translate( | + | translate(DESCR,'-0123456789','-') /* Removes digits from descriptiont field. */ |
</pre> | </pre> | ||