Wednesday, March 7, 2012

different results in query analyzer and .net

ok the following statement returns the correct results in sql query analyzer but in the .net environment with c# it returns back less 3 records

SELECT SUM(ao.amount),bl.dpc,bl.city from billinglocation bl
inner join shippinglocation sl on bl.billinglocationid = sl.billinglocationid
inner join absorbentorder ao on sl.shippinglocationid = ao.shippinglocationid
group by bl.dpc, bl.city

billinglocation 1 - 1 shippinglocation 1 - many absorbentorder

anybody have any ideas why this might be occuring
thanks!

are you connecting to the right database?|||If you are receiving different results then you are not running the exact same thing. Are there any parameters involved? As Dinakar asked, are you sure you are running the query against the same database? We are probably going to need to see your C# code in order to be of any real help.

No comments:

Post a Comment