Hi,
I'm using Iquery for my search screens. The below is my Iquery from which i'm getting list of salesorders.
select so.SalesOrderIdentifier, so.SalesOrderSuffix, so.PurchaseOrder.PurchaseOrderIdentifier, so.DivisionCustomerIdentifier, so.TagName, so.OrderDate, so.DivisionSalesOrderStatusType.StatusTypeCode, so.ShipVia, so.LoadNumber, so.RequestedDeliveryDate, br.Name from SalesOrder so left outer join so.SalesOrderLines sol left outer join sol.ProductInstance po left outer join po.ProductOptionInstances poi left outer join poi.DivisionProductOptionInstanceType dpoit, Brand br where dpoit.TypeCode = 'BRD' and poi.Value = br.BrandCode and so. group by so.SalesOrderIdentifier, so.SalesOrderSuffix, so.PurchaseOrder.PurchaseOrderIdentifier, so.DivisionCustomerIdentifier, so.TagName, so.OrderDate, so.DivisionSalesOrderStatusType.StatusTypeCode, so.ShipVia, so.LoadNumber, so.RequestedDeliveryDate
Here brand will be obtained through the tree of the salesorder.SalesOrderLines.ProductInstance.ProductOptionInstances.Value.
The value is the Brand code in the SalesOrder tree. I need to get the collection of the brand Names for each salesorder whose Name is avaliable in Brand table.
How can i acheive this through IQuery?
Can any one help me out of this?
Sample Data:
SalesOrderID Date Brand 12000 12-02-2009 Br1 12000 12-02-2009 Br2 12001 Null Br1 12002 Null Br2 12003 01-02-2010 Br1 12003 01-02-2010 Br2
If u consider this as a sample data through which i got from the above query. I need to get only the unique salesorder. i.e
SalesOrderID Date Brand 12000 12-02-2009 List(Br1,Br2) 12001 Null Br1 12002 Null Br2 12003 01-02-2010 List(Br1,Br2)
This is my agenta. Is it possible with this?
|