Access field from joined table?
Posted: Wed 15 Jul 2015 12:10
Hi,
let's assume I have two tables:
In Sql I can get the value of the product name with "orders.name" (because name is ambiguous).
When I'm working with UniDAC I have to use something like "name_1" which is not really comfortable.
Is there a better way? For example TUniQuery.Table('orders').FieldByName('name').AsString
Thank you.
let's assume I have two tables:
- * customer with id and name and
* orders with id, customer id, (product) name and order number.
Code: Select all
SELECT * FROM customer LEFT JOIN customer ON customer.id = customerid
When I'm working with UniDAC I have to use something like "name_1" which is not really comfortable.
Is there a better way? For example TUniQuery.Table('orders').FieldByName('name').AsString
Thank you.