Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 strange behavior with statement

Author  Topic 

clean
Starting Member

7 Posts

Posted - 2006-05-05 : 09:27:16
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!

nr
SQLTeam MVY

12543 Posts

Posted - 2006-05-05 : 09:38:08
Use the profiler to see the statement sent from the app.

If that's the same then it could be some settings that are different (ansi nulls, ...)
Otherwise the app is probably losing the rows.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -