You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Thomas Phan <tw...@entersys.com> on 2003/03/17 11:41:22 UTC

OQL datetime string

Hi,

Is there an escaped string format for datetime in OQL that allows all JDBC
drivers to:

odmg.newOQLQuery().create("select user from " + Users.class.getName() + "
where modifiedOn<='2003-03-17'"); <- I'm not sure about the
"modifiedOn<='2003-03-17'" part

In JDBC, we can "select * from Users where modifiedOn<={d '2003-03-17'}"


FYI,

CREATE TABLE Users(
    userId          VARCHAR2(50)     NOT NULL,
...
    createdBy       VARCHAR2(50),
    createdOn       DATE,
    modifiedBy      VARCHAR2(50),
    modifiedOn      DATE,
    CONSTRAINT PK_Users PRIMARY KEY (userId)
);

Thanks

Thomas


Re: OQL datetime string

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi thomas,

what happens when you use the standard jdbc escape for date ?

jakob

Thomas Phan wrote:

>Hi,
>
>Is there an escaped string format for datetime in OQL that allows all JDBC
>drivers to:
>
>odmg.newOQLQuery().create("select user from " + Users.class.getName() + "
>where modifiedOn<='2003-03-17'"); <- I'm not sure about the
>"modifiedOn<='2003-03-17'" part
>
>In JDBC, we can "select * from Users where modifiedOn<={d '2003-03-17'}"
>
>
>FYI,
>
>CREATE TABLE Users(
>    userId          VARCHAR2(50)     NOT NULL,
>...
>    createdBy       VARCHAR2(50),
>    createdOn       DATE,
>    modifiedBy      VARCHAR2(50),
>    modifiedOn      DATE,
>    CONSTRAINT PK_Users PRIMARY KEY (userId)
>);
>
>Thanks
>
>Thomas
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>  
>