Hi When I used ReqportQueryByCriteria, in a particular case there was an SQL Exception: ambiguous columns
By using profiler I deduced that the query that gives this exception is SELECT A0.FutureId,BrokerAccountId,CommodityId,Month,BuySell,Spread,FixedPrice,DealDate,DoneBy,OpenClose,AffiliateId,Purpose,StrategyName,StrategyNum,ShipmentId,BrokerId,BrokerAccountId,Quantity,A0.Quantity,A0.FixedPrice,A0.BuySell FROM DealTradingSystemv1.dbo.Future A0 INNER JOIN FutureCommodity A1 ON A0.CommodityId=A1.CommodityId WHERE A0.CommodityId = '24' ORDER BY 2,3,4,5,6,7 This problem can be solved if the query is modified to SELECT A0.FutureId,BrokerAccountId,A0.CommodityId,Month,BuySell,Spread,FixedPrice,DealDate,DoneBy,OpenClose,AffiliateId,Purpose,StrategyName,StrategyNum,ShipmentId,BrokerId,BrokerAccountId,Quantity,A0.Quantity,A0.FixedPrice,A0.BuySell FROM DealTradingSystemv1.dbo.Future A0 INNER JOIN FutureCommodity A1 ON A0.CommodityId=A1.CommodityId WHERE A0.CommodityId = '24' ORDER BY 2,3,4,5,6,7 Note the A0 prefix to CommodityId in the SELECT statement in the modified query. It seems that ReportQueryByCriteria is not generating the A0 prefix for all the SELECT fields. Is this a bug? Regards Naveen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
