Hello,
I have the following table structure:
CREATE TABLE MEPPBX (
ID numeric PRIMARY KEY NOT NULL,
PHAR numeric NOT NULL,
BOX numeric NOT NULL,
BEGINN date NOT NULL,
END date NULL,
GRND numeric NULL,
FOREIGN KEY (PHAR) REFERENCES MEPP(ID),
FOREIGN KEY (BOX) REFERENCES MEBOX(ID));
create table MEBOX(
ID NUMBER(22) PRIMARY KEY not null,
BOX VARCHAR2(3) not null,
VERSION NUMBER(22))
CREATE TABLE MEPP (
ID numeric PRIMARY KEY NOT NULL,
);
The MEPPBX is the table that connects MEBOX with MEPP. Additionally it holds the beginn and end date where the MEBOX is valid for the MEPP.
No I want to find out the MEPP where the MEBOX has changed to MEBOX.BOx='TEST' within the last month!
Is this possible using a criteria query or either a HQL?
Thx's a lot for any help! Rene
|