posted 18 years ago
Thanks for the tip, however the same exception still persists afterwards - any other ideas - maybe its a mismatch of datatypes?
SELECT DISTINCT OBJECT(h) FROM House h, Location l
WHERE h.location = l.name
AND l.description = ?1
AND h.bedrooms = ?2
AND (h.price BETWEEN ?3 AND ?4)
Ive included the database tables below to see if that is where I am going wrong - sorry about all these questions, its just that Ive been at this for a few days, and have reached no where.
create table House(
ref varchar(16),
seller varchar(16),
description varchar(512),
bedrooms integer,
location varchar(16),
price integer,
CONSTRAINT pk_house PRIMARY KEY (ref,seller),
CONSTRAINT fk_seller FOREIGN KEY (seller) REFERENCES Seller(login),
CONSTRAINT fk_location FOREIGN KEY (location) REFERENCES Location(name));
create table Location(
name varchar(16) CONSTRAINT pk_location PRIMARY KEY,
description varchar(64));
Thanks for all the help so far, much appreciated!
Pete