Reputation: 179
How to join below two tables using gosu .. This is from Contact Manager (GW Training App)
1 ABContact
2 BankAccount
Below SQL can be used to find all account hold by one particluar contact
select b.accountnumber from ABContact a, BankAccount b where
a.id=b.contactid and a.id='123'
Please write the same query in Gosu
Upvotes: 0
Views: 4924
Reputation: 512
Query is like this
uses gw.api.database.Query
var account: BankAccount
var query = Query.make(ABContact).join("ID", BankAccount, "Contact").compare(BankAccount#ID, Equals, account.ID)
Upvotes: 2