CREATE LABEL

From Lianjapedia
Jump to: navigation, search

Purpose

Create a label format definition file for use with the LABEL FORM mailing label generation command

Syntax

CREATE LABEL <.lbl filename> FROM <tablename>

See Also

CLOSE, CLOSE DATABASE, CREATE FROM, DROP TABLE, INSERT, LABEL FORM, OPEN DATABASE, USE

Description

The LABEL FORM command is used to generate and print mailing and other labels. It operates by reading the format/layout of the labels from a .lbl file. The CREATE LABEL command is used to create the .lbl file from a defined table structure populated with a label definition record. See the example below for the table structure.

Keyword Description
<.lbl filename> The label format file to be created.
<tablename> The source table containing the label definition.

Example

close database
open database southwind
drop table _label_example if exists
create table _label_example (width int, height int, margin int, lines int, spaces int, across int,;
                            remark char(60), line1 char(50), line2 char(50), line3 char(50),;
                            line4 char(50), line5 char(50), line6 char(50), line7 char(50),;
                            line8 char(50), line9 char(50), line10 char(50), line11 char(50),;
                            line12 char(50), line13 char(50), line14 char(50), line15 char(50),;
                            line16 char(50))
insert into _label_example (width, height, margin, lines, spaces, across, remark, line1, line2,;
                            line3, line4, line5, line6) ;
                           values(30, 6, 2, 1, 10, 4, "Example label format", "contactname",;
                            "companyname", "address", "city", "postalcode", "country")
close _label_example
create label example from _label_example
use customers
label form example to file output.txt
close database