Consultor Eletrônico



Kbase 18449: Proper Syntax Using Extents With Insert Into SQL Statement for SQL-89
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

Proper Syntax Using Extents With Insert Into SQL Statement for SQL-89

FIX:

The following code demonstrates both inserting data into a field that has extents, and also adding data to that field with a variable's extent values.

1) Create a new character field in the sports.customer table, called 'test'.  Give it an EXTENT of 2.

2) Launch the Procedure editor and type the following:

DEFINE VARIABLE person AS CHARACTER FORMAT "x(10)"
EXTENT 3 INITIAL ["henry","amy", "rob"].

INSERT INTO CUSTOMER (name, address, city, test[1], test[2], postal-code, cust-num) VALUES (person[3], 'my street', 'boston','blue', 'dog', '02136', 106).