Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blog:iseries:rpg [2020/03/07 04:31] tom [Monitor (for errors)] |
blog:iseries:rpg [2020/03/07 04:37] (current) tom [Strings] |
||
---|---|---|---|
Line 1142: | Line 1142: | ||
Create commands create 2 names - an SQL name (128 char max) and a system name (10 char max) | Create commands create 2 names - an SQL name (128 char max) and a system name (10 char max) | ||
Create Table (PF) | Create Table (PF) | ||
- | %%Create Table xxx As Select...%% | + | <code sql>Create Table xxx As Select...</code> |
: creates a table using a subset of field from an existing table | : creates a table using a subset of field from an existing table | ||
- | %%Create Table xxx Like MyTable...%% | + | <code sql>Create Table xxx Like MyTable...</code> |
: all fields in referenced table used in created table | : all fields in referenced table used in created table | ||
Create View | Create View | ||
Line 1182: | Line 1182: | ||
: a set of actions that are run automatically whenever a specified event occurs to a specified base table | : a set of actions that are run automatically whenever a specified event occurs to a specified base table | ||
UDT | UDT | ||
- | <code sql>CREATE DISTINCT TYPE US_DOLLAR AS DECIMAL (9,2)</code> | + | <code sql>CREATE DISTINCT TYPE US_DOLLAR AS DECIMAL (9,2)</code> |
: can then create tables with field types of US_DOLLAR (or string, integer, etc.) | : can then create tables with field types of US_DOLLAR (or string, integer, etc.) | ||
view | view | ||
Line 1374: | Line 1374: | ||
| TRIMR | %TRIMR | | | TRIMR | %TRIMR | | ||
- | ------------------------------------------------------------------------------- | ||
===== Strip Leading Zeros ===== | ===== Strip Leading Zeros ===== | ||