本帖最后由 irene 于 2012-6-26 10:49 编辑
var userid =getWebUser().getId();
var sql="select distinct doc.id id, doc.auditdate, doc.formid,fs.flowid,pen.flowname flowname,doc.statelabel,pen.summary,doc.auditornames,doc.AUDITORLIST,doc.APPLICATIONID,doc.DOMAINID from GALLOPSOA.T_DOCUMENT doc,GALLOPSOA.T_FLOW_INTERVENTION pen,GALLOPSOA.T_FLOWSTATERT fs,GALLOPSOA.T_NODERT node,GALLOPSOA.T_ACTORRT actor where doc.id = pen.id and doc.id =fs.docid and fs.id =node.flowstatert_id and node.id = actor.nodert_id and doc.issubdoc is null and doc.parent is null and doc.state is not null and doc.statelabel is not null and actor.actorid ='";
sql+=userid;
sql+="'";
var rs = queryBySQL(sql);
var html="";
for (var iter1 = rs.iterator(); iter1.hasNext();) {
var doc = iter1.next();
html+=doc.getItemValueAsString("flowname");
}
html;
println出来的sql,可以在mysq客户端执行的。但是
控制台出错:
WARN Document:809 - Item flowname's value can't get as string!
其他字段也是这一样的错误,为何?
怎么获取querybysql的关联表字段信息呢? |