cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank" <faro...@hotmail.com>
Subject help with AS400 call
Date Tue, 13 Feb 2007 16:09:53 GMT
Hello,

I have the followign defined as a Raw Sql in Cayenne

SELECT BSYDTAA.BSYPEMP.EMYLNM, BSYDTAA.BSYPEMP.EMYFNM, 
BSYDTAC.BPRPPCP.PCDEP4, BSYDTAC.BPRPPCP.PCLDDS, BSYDTAA.BSYPEMP.EMEMP# AS 
EMEMP, BSYDTAA.BSYPEMP.EMWPH# AS WPHONE FROM BSYDTAA.BSYPEMP, 
BSYDTAC.BPRPPCP WHERE BSYDTAA.BSYPEMP.EMHSP# = BSYDTAC.BPRPPCP.PCHSP# AND 
BSYDTAA.BSYPEMP.EMDEP4 = BSYDTAC.BPRPPCP.PCDEP4 AND (BSYDTAA.BSYPEMP.EMHSP# 
IN (1,5)) AND (BSYDTAA.BSYPEMP.EMDOT=0)
AND EMYLNM like ?
AND EMYFNM like ?
ORDER BY EMYLNM

I am trying something like this, but it is not working:

DataContext context = DataContext.getThreadDataContext();

Expression qualifier1 = 
ExpressionFactory.likeIgnoreCaseExp(Employees.EMYFNM_PROPERTY,fname+"%");

Expression qualifier2 = 
ExpressionFactory.likeIgnoreCaseExp(Employees.EMYLNM_PROPERTY,lname+"%");

SelectQuery query = new SelectQuery(Bsypemp.class,qualifier2);

List records = context.performQuery(query);

What am I doing wrong?
Thanks
Frank


Mime
View raw message