Viewing 15 posts - 1 through 15 (of 38 total)
I reviewed the code a little closer this time. I went ahead and made a correction to the NOT EXISTS to utilize the LEFT JOIN by placing the referenced columns...
November 17, 2011 at 12:59 pm
What exactly is the NOT EXISTS trying to accomplish? It appears the code is almost duplicated, even to the left join issue described before. I would suggest also using a...
November 17, 2011 at 12:47 pm
Your LEFT JOIN table has columns specified in the WHERE clause checking for specific values, thereby eliminating the not matched rows.
and cd.documentname like '%patient profile'
and cd.isincomplete = 1
If you...
November 17, 2011 at 12:24 pm
More than likely it is due to the tables joined together having 2 or more rows that link together.
Please post table definitions, sample data and desired output. Read this to...
November 17, 2011 at 11:42 am
OK, this one took a little bit to comprehend. There were a lot of subquery nesting levels. I interpreted some of the code to fix the "missing" columns of DataSourceName...
November 17, 2011 at 11:36 am
OK, I realized the formatting aspect of greater than symbols is not coming across correctly, even in my "EDIT" section.
One more try to not cause any more confusion than I...
November 16, 2011 at 9:32 am
Will the @aaa parameter ever be NULL? You have to check for this case explicitly.
Try changing the IF clause to:
AND ( (@aaa > '' AND T1.aaa=@aaa) OR (@aaa='') )...
November 16, 2011 at 9:28 am
What is the @aaa parameter? I do not see it in your code example. Where does it come from and how is it set?
Also, are you wanting to add it...
November 16, 2011 at 8:43 am
Would you be able to provide a little more information to your situation? Some sample data and the SQL you use that generates the NULL value would be very helpful.
November 12, 2011 at 9:56 pm
I just had this same type of scenario in a new project of mine I just finished. The premise behind my version was to link all matching person records together...
November 12, 2011 at 9:53 pm
Based on what you describe, it sounds like a distributed transaction issue. Would you check to see if the MS DTC service is running on the server? Select statements do...
November 10, 2011 at 9:33 pm
Well, I will give a few general suggestions you can use to help speed this monster up. It would take more than a couple of minutes to generate an ideal...
November 10, 2011 at 10:16 am
In terms of transactions present, i meant to also ask about whether the "Require distributed transactions for server-to-server communication" is selected on the server of the insert? If so, you...
November 10, 2011 at 9:27 am
Was a transaction explicitly started for the INSERT?
November 10, 2011 at 9:13 am
Drew, you are correct. Thank you for posting the appropriate SQL. I had a brain lapse and know better. Best to perform a "less than" in most cases than mess...
November 9, 2011 at 7:11 pm
Viewing 15 posts - 1 through 15 (of 38 total)