Quantcast

New User: Syntax Check

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

New User: Syntax Check

Rich Shepard
   To make life simpler for users of a couple of database applications I want
to implement them with LibreOffice-4.3.5's Base. I understand that the
hsqldb built in LO is version 1.8.

   I've developed applications using postgres and sqlite and am familiar with
the DDL syntax of those. From reading the latest hsqldb user guide I believe
that the schema .sql file has the correct syntax, but would greatly
appreciate a reality check. This table definition has primary and foreign
keys, a column comment, and a check constraint:

CREATE TABLE Auctions (
     comment on column (item_id) is display picklist for choosing
     item_id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
     auction_type CHAR(6) NOT NULL CHECK (auction_type IN ('Live','Silent')),
     reserve_price REAL,
     sale_amt REAL NOT NULL,
     winner_bid_nbr INTEGER NOT NULL,
     FOREIGN KEY (winner_bid_nbr) REFERENCES Attendees(bid_nbr) on undate
     cascade delete cascade
);

Please let me know if the syntax is correct.

   How to I read this .sql file into a named hsqldb database file so LO can
connect and work with it? I did not see this in the user guide.

TIA,

Rich

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New User: Syntax Check

Rich Shepard
On Wed, 21 Jan 2015, Rich Shepard wrote:

>     comment on column (item_id) is display picklist for choosing
                                                                   ^
   Lost closing parenthesis; it's in the schema file.

Rich

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New User: Syntax Check

Rich Shepard
On Wed, 21 Jan 2015, Rich Shepard wrote:

>   Lost closing parenthesis; it's in the schema file.

   Sorry. The comment string should be enclosed in quotes, not parentheses.

Rich

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Loading...