January 4, 2007 at 12:40 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 4, 2007 at 3:10 pm
Do you mind to try with coalesce instead and see ?
coalesce((your select stuff here),-1)
Also Hints are nothing but that; "hints". It does not means that you will be granted that isolation, although *most of the time you do*.
* Noel
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy