Try OpenEdge Now
skip to main content
SQL Development
OpenEdge SQL Data Definition Language : Working with SQL utilities : Using the SQLLOAD utility : Loading partitioned tables
 
Loading partitioned tables
The SQLLOAD utility allows you to load data onto partitioned tables with the command line parameter - p.
The command line parameter - p, is an optional parameter and specifies a comma-separated list or expressions of one or more partitions to be loaded. It is mutually exclusive with the -n and -g parameters.
Notes
*Existence of the - p parameter makes the use of -t optional. If the -p parameter is not specified, then the SQLLOAD utility treats the table as a normal table. If the -p parameter is specified, then the SQLLOAD utility loads only those partitions that are specified in the -p list.
*If both -t and -p parameters are specified, then each partition that belongs to or qualifies to belong to partition_name1 must have its table name specified in the -t list; otherwise, the SQLLOAD utility returns an error. It ignores the -p parameter for normal tables listed in the -t list.
*The SQLLOAD utility also returns an error if a standalone % operator is specified with partition names or expressions that are not being loaded.
Examples: SQLLOAD for partitioned tables
The following examples illustrate loading data onto the customers table with three partitions, part_1, part_2, and part_3. The user_name and password for connecting to the database are tucker and sulky. The tucker account must have the authority to access the customers table in the salesdb database.
The following example directs the SQLLOAD utility to search for a directory named tucker.customers and load part_1 and part_3 data of the customers table from the files tucker.customers.part_1.dsql and tucker.customers.part_3.dsql. If the files do not exist, the SQLLOAD utility returns an error.
sqlload -u tucker -a sulky -t customers -p part_1,part_3
progress:T:thunder:4077:salesdb
The following example directs the SQLLOAD utility to search the specified directory for a table whose partition matches part_% and load partitions of the specified table that match part_% from their respective files. If the files do not exist, the SQLLOAD utility returns an error.
sqlload -u tucker -a sulky -p part_%
progress:T:thunder:4077:salesdb