Does the MySql Table Adapter or Query Builder allow sub queries like the following example?
SELECT ProductID, ProductName, SupplierID, CategoryID,
QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued,
(SELECT CategoryName FROM Categories
WHERE Categories.CategoryID = Products.CategoryID) as CategoryName,
(SELECT CompanyName FROM Suppliers
WHERE Suppliers.SupplierID = Products.SupplierID) as SupplierName
FROM Products
Does the MySql Table Adapter or Query Builder allow sub queries like the following example?
We tested queryIt is unable to use this query with CS2005 Configuration Wizard, but you can create Table Adapters with DataSet Wizard.
Note that we found a problem in DataSet Wizard: when creating Table Adapter columns in the table are not generated. This problem will be fixed in the next build, which becomes available in a few days. To avoid this problem in current version just press "Configure" on created Table Adapter, columns will be generated.
Code: Select all
select ename, (select dname from dept where deptno=emp.deptno) as dname from emp
Note that we found a problem in DataSet Wizard: when creating Table Adapter columns in the table are not generated. This problem will be fixed in the next build, which becomes available in a few days. To avoid this problem in current version just press "Configure" on created Table Adapter, columns will be generated.