January 4, 2007 at 12:26 pm
This join worked in SQL 2000. In SQL 2005 it hangs.
I need to receive a -1 IF the select does not get a hit.
INNER JOIN insrs WITH (NOLOCK) ON insrs.insrsid = isnull((select top 1 insrs1.insrsid from insrs as insrs1 with (nolock)
where insrs1.ticketsid = #PAX1.ticketsid
and insrs1.submittal_status = '1'
and insrs1.deleted = 'N'
order by insrs1.filed desc),-1)
Thanks for you help,
Phil
January 5, 2007 at 2:41 am
Could you post the complete join? (or the complete query..)
If possible, a brief explanation of the query's purpose would also be helpful.
The subselect looks like some weird version of something an EXISTS/NOT EXISTS or LEFT JOIN construction.
(It's not very effective, though)
By 'hang' do you mean that it takes longer than ususal?
If so, are the two servers equal in hardware (particularly disks)
How large are the tables involved?
/Kenneth
January 5, 2007 at 5:42 am
Phil cross-posted this. See http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=334455
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply