Is it possible to retrieve only certain fields of a table through OJB
OQL? Something similar to the SQL: select id, video_id from VIDEO_DATA
where id=5.
Doing things like select id, videoId from + VideoData.class.getName()
+ where id = + videoDataId doesn't seem to work. It continues
]
Sent: Friday, December 26, 2003 4:14 PM
To: [EMAIL PROTECTED]
Subject: Newbie OQL select question - can I selectively retrieve fields?
Is it possible to retrieve only certain fields of a table through OJB OQL?
Something similar to the SQL: select id, video_id from VIDEO_DATA where
id=5.
Doing
You can also use the ReportQuery for doing what you want but it doesn't
return objects , only the request rows .
-Original Message-
From: Ara Juljulian [mailto:[EMAIL PROTECTED]
Sent: Friday, December 26, 2003 4:14 PM
To: [EMAIL PROTECTED]
Subject: Newbie OQL select question - can I
That sounds like an interesting solution. I'll try that. Thanks.
-Ara-
-Original Message-
From: Thierry Hanot [mailto:[EMAIL PROTECTED]
Sent: Friday, December 26, 2003 7:20 AM
To: 'OJB Users List'
Subject: RE: Newbie OQL select question - can I selectively retrieve
fields?
May be you
Hi,
personnally, I put :
criteria.addSql(date = TO_DATE('2004', ''));
But I think there other possibilities
-Message d'origine-
De : Glauber Andrade [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 18 décembre 2003 00:19
À : OJB Users List
Objet : select question (again)
How do I implement
Hennebelle wrote:
personnally, I put :
criteria.addSql(date = TO_DATE('2004', ''));
There's also:
criteria.addEqualTo(date, TO_DATE('2004', ''));
Works similar with all operators/'add'-methods on a Criteria.
Regards,
Martin
--
Martin Kalén
Curalia AB Web:
: Re: select question (again)
Hennebelle wrote:
personnally, I put :
criteria.addSql(date = TO_DATE('2004', ''));
There's also:
criteria.addEqualTo(date, TO_DATE('2004', ''));
Works similar with all operators/'add'-methods on a Criteria.
Regards,
Martin
How do I implement a select like this with OJB Criteria ?
select * from TABLE where date = TO_DATE('2004','') (as on
Oracle)
or
select * from TABLE where YEAR(date) = 2004
(as on MySQL)
THANKS,
Glauber Andrade
How do I implement a select like this with OJB Criteria ?
select * from TABLE where date = TO_DATE('2004','')
THANKS,
Glauber