SELECT
a.keyField,
a.fieldA1
FROM
testTable1 a,
testTable2 b
WHERE
a.keyField = b.keyFieldThat would also fix the ambiguous keyField.
Henner Kollmann wrote:
Simple SQL problem. Must rename your keyfields the a.keyfield and b.keyfield. Or - better - use a view inside your database.
Regards, Henner
<%@ taglib uri="WEB-INF/dbforms.tld" prefix="db" %>
<html xmlns:db="http://www.wap-force.com/dbforms">
<head><db:base/></head>
<body>
<db:dbform followUp="/plan_single2.jsp" maxRows="*" tableName="testTable1" tableList="testTable1 a, testTable2 b"
whereClause="WHERE a.keyField = b.keyField" >
<db:body>
<db:textField size="5" fieldName="b.fieldB1"/>
</db:body>
</db:dbform>
</body>
</html>
Whenever I try this, the debug output returns the following error: 464018 -------- [tcpConnection-80-2] INFO org.dbforms.Table - ::getFreeFormSelectQuery -- [SELECT keyField, fieldA1 FROM testTable1 a, testTable2 b WHERE a.keyField = b.keyField] 464028 -------- [tcpConnection-80-2] ERROR org.dbforms.util.SqlUtil - ::logSqlExceptionSQL - exception
java.sql.SQLException: General error: Column: 'keyField' in field list is ambiguous
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ DbForms Mailing List
http://www.wap-force.net/dbforms
-- David Richardson Software Engineer 215-895-1080 x80951 The Math Forum @ Drexel University
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ DbForms Mailing List
http://www.wap-force.net/dbforms
