An application can use the blk_props Bulk-Library routine to set or retrieve BLK_CUSTOM_CLAUSE:
Property name |
Description |
*buffer is |
Applies to |
Notes |
---|---|---|---|---|
BLK_CUSTOM_CLAUSE |
A custom, application-specific SQL clause to add after the existing with clause of the insert bulk command. |
A character string containing the custom clause. |
IN copies only |
Supported only by server versions that support the custom SQL clause. Currently used only by internal products. |
A select into operation is allowed only if the Adaptive Server select into/bulkcopy/pllsort database option is set to on.
For full logging of a select into operation, the Adaptive Server full logging for select into database option must be set to on.
BLK_CUSTOM_CLAUSE is set with blk_props:
blk_props(blkdesc, CS_SET, BLK_CUSTOM_CLAUSE,
(CS_VOID *)"from select_into", CS_NULLTERM, NULL);
Adaptive Server generates a bulk copy operation with the specified custom clause appended:
insert bulk mydb.mytable with nodescribe from select_into
where mydb and mytable are the affected database and table.