Thanks jgarfield for reply,
I want to filter by tableA as well as tableB. I want to join tableB which should have some WHERE clause or AND clause and then join tableA say for example
- Code: Select all
foundset.loadRecords("SELECT tableA.primary_key FROM tableA JOIN tableB ON tableB.some_column = tableA.matching_column AND tableB.DateColumn=? WHERE tableA.search_column = ?", [ TODAY(),"searchValue"))
Is this possible in servoy as when I execute my sql statement it give me improper data
- Code: Select all
foundset.loadRecords(SELECT employee.emp_id FROM employee LEFT OUTER JOIN employeejob ON employee.emp_id=employeejob.emp_id AND employeejob.startdate=? WHERE employee.status=?,[TODAY(),"searchValue"])
In other words I want to load details of employees for today's date
In MS SQL SERVER, the above query execute correctly whereas in servoy is not able to interpret " AND employeejob.startdate=? " instead iit is interpreting as "foundset.loadRecords("SELECT tableA.primary_key FROM tableA JOIN tableB ON tableB.some_column = tableA.matching_column WHERE tableB.search_column = ?", ["searchValue"])