This is not a NHibernate issue, or even a Stored Procedure issue. You are getting a perfect Cartesian Join where
737 (records in first query) X 809 (records in second query) = 596233 (records from combined query) There is something wrong with the basic sql syntax that you need to correct John Davidson On Wed, May 5, 2010 at 2:37 AM, [email protected] <[email protected]>wrote: > I am new to Stored Procs, so please bear with me guys... but I am > having a strange issue, and thought that I would post it here whilst I > continue to try and sort it out - perhaps someone else has expereinced > it. > > Both the queries below returns the correct results individually: > > SELECT #repeatOrders.repeatresellerID FROM > #repeatOrders.repeatresellerID WHERE #repeatOrders.repeatresellerID = > 1114 > ---737 records returned --- > > SELECT #newtOrders.newsellerID FROM #newtOrders.newsellerID WHERE > #newtOrders.newsellerID = 1114 > ---809 records returned --- > > but when I attempt to combine them, I get a horribly large number of > records returned... The join I am using is listed below: > > SELECT > #repeatOrders.repeatresellerID > FROM > #repeatOrders > INNER JOIN #newOrders on #newOrders.newresellerID = > #repeatOrders.repeatresellerID > WHERE #repeatOrders.repeatresellerID = 1114 > > ---596233 records returned --- > > > Does anyone have any ideas ? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
