summaryrefslogtreecommitdiff
path: root/examples/gui/interbasetest/mkdb
blob: b4142314fada2329d405ce34fd23a04d4fef437d (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
#
# Script to create a table 'FPdev' and to fill it with data.
# The script accepts an optional argument : 
# A database to connect to. (default 'testdb')
#
# Collect  the database
DATABASE=test.gdb
# Choose one of the following:
# ISQL=isql
ISQL=/opt/interbase/bin/isql
#
# Don't edit after this.
#
echo -n "Creating and filling table FPdev in database $DATABASE..."
# >/dev/null 2>&1
${ISQL} << EOF
set sql dialect 3;
CREATE DATABASE "$DATABASE";
create table FPDEV ( 
id INT NOT NULL,
UserName varchar(50),
InstEmail CHAR(50),
PRIMARY KEY (id));
insert into FPdev values ('1','Michael Van Canneyt','Michael@tfdec1.fys.kuleuven.ac.be');
insert into FPdev values ('2','Florian Klaempfl','ba2395@fen.baynet.de');
insert into FPdev values ('3','Carl-Eric Codere','codc01@gel.usherb.ca');
insert into FPdev values ('4','Daniel Mantione','d.s.p.mantione@twi.tudelft.nl');
insert into FPdev values ('5','Pierre Muller','muller@europe.u-strasbg.fr');
insert into FPdev values ('6','Jonas Maebe','jmaebe@mail.dma.be');
insert into FPdev values ('7','Peter Vreman','pfv@worldonline.nl');
insert into FPdev values ('8','Gerry Dubois','gerry@webworks.ml.org');
insert into FPdev values ('9','name9','mail9');
insert into FPdev values ('10','name10','mail10');
insert into FPdev values ('11','name11','mail11');
insert into FPdev values ('12','name12','mail12');
create table test (
timestamp_fld timestamp,
smallint_fld smallint,
integer_fld integer,
float_fld float,
double_fld double precision,
char_fld char(10),
varchar_fld varchar(50));
insert into test values ('12.1.2000 00:30',10,70000,12.5,20.5,'testchar','testvarchar');
commit;
EOF
if [ ! $? = 0 ]; then
  echo "Failed."
else
  echo "Done."
fi
# Ready