SVLABEL

The optional keyword SVLABEL is used to include the keyword value as the first column value for database table inserts or as the where constraint for database table selects.

Example

1.  In the following example, the value 23 is inserted into the first column (ID):

    READ FILE(order.csv) SVTABLE(ORD) SVCOLUMN(ORDER) SVLABEL(23)

 

    "INSERT INTO ORD(ID,LINENUM,PARTNUM,PARTDSC,PARTAMT,PARTQTY) (23,?,?,?,?,?)"

 

2.  In the following example, the first column (ID) is used to receive SV values:

    READ FILE(order.csv) SVTABLE(ORD) SVCOLUMN(ORDER)

 

    "INSERT INTO ORD(ID,LINENUM,PARTNUM,PARTDSC,PARTAMT,PARTQTY) (?,?,?,?,?,?)"

 

3.  In the following example, the ID column is not in the selection but is used in the where clause:

    WRITE FILE(order.csv) SVTABLE(ORD) SVCOLUMN(ORDER) SVLABEL(23)

 

    "SELECT LINENUM,PARTNUM,PARTDSC,PARTAMT,PARTQTY FROM ORD WHERE ID=23"

 

4.  In the following example, the ID column is included in the selection, because no SVLABEL is present:

    WRITE FILE(order.csv) SVTABLE(ORD) SVCOLUMN(ORDER)

 

    "SELECT ID,LINENUM,PARTNUM,PARTDSC,PARTAMT,PARTQTY FROM ORD"