1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
DROP TABLE ACCOUNT;
DROP TABLE ORGANIZATIONTYPELIST;
CREATE TABLE ACCOUNT (
ACCOUNT_ID INT PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY,
ACCOUNTTYPE_CD VARCHAR(30),
ACCOUNT_NAME VARCHAR(30),
WEB_SITE_ADDRESS VARCHAR(30),
STREET_ADDRESS_1 VARCHAR(30),
STREET_ADDRESS_2 VARCHAR(30),
STREET_ADDRESS_3 VARCHAR(30),
CITY VARCHAR(10),
STATE_CD VARCHAR(2),
POSTAL_CD VARCHAR(5),
COUNTRY_CD VARCHAR(3),
PHONE_NUMBER VARCHAR(15),
FAX_NUMBER VARCHAR(15),
NOTE VARCHAR(50));
CREATE TABLE ORGANIZATIONTYPELIST (
ORGANIZATIONTYPEID INT PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY,
CODE VARCHAR(10),
DISPLAYVALUE VARCHAR(30),
DESCRIPTION VARCHAR(30),
ISEDITABLE INT);
INSERT INTO ACCOUNT (ACCOUNTTYPE_CD, ACCOUNT_NAME, WEB_SITE_ADDRESS, STREET_ADDRESS_1, STREET_ADDRESS_2, STREET_ADDRESS_3, CITY, STATE_CD, POSTAL_CD, COUNTRY_CD, PHONE_NUMBER, FAX_NUMBER, NOTE) VALUES ('ACC_TYPE_01', 'NAME_001', 'http://name_001.com', '1234 Street 1', '', '', 'San Jose', 'CA', '95134', 'USA', '', '', 'NAME 001 NOTES');
INSERT INTO ORGANIZATIONTYPELIST (CODE, DISPLAYVALUE, DESCRIPTION, ISEDITABLE) VALUES('ACME', 'ACME Organization', 'ACME Description', 0 );
INSERT INTO ORGANIZATIONTYPELIST (CODE, DISPLAYVALUE, DESCRIPTION, ISEDITABLE) VALUES('DO-RITE', 'DO-RITE Plumbing', 'DO-RITE Plumbing Description', 0 );
INSERT INTO ORGANIZATIONTYPELIST (CODE, DISPLAYVALUE, DESCRIPTION, ISEDITABLE) VALUES('MEGACORP', 'MEGACORP Organization', 'MEGACORP Description', 0 );
|