Viewing 15 posts - 376 through 390 (of 397 total)
I think you're getting those scans because of the ISNULL clauses. You could try an OR where you check for each of the values independently, but that still might not...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
February 19, 2009 at 9:13 am
The ad-hoc query shows an estimated 697 rows from the att_patient table, while the function shows just 1. Which sounds more correct?
The 697 is more correct. Dave posted the...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
February 19, 2009 at 8:47 am
Thanks for the explanation. Apparently, recalculating the statistics did wonders. The function executes now!! :w00t:
Still, I'm going to investigate the index issue. While SourceID is indeed on...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
February 19, 2009 at 8:39 am
I can certainly see your concern about this:
WHERE R.MedGroupID = ISNULL(@MedGroupID, R.MedGroupID)
But I'm not sure what else I can do to allow the MedGroupID to be specified yet if it's...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
February 19, 2009 at 8:19 am
The commented lines are what I used to change it from an inline UDF to a multi-line UDF. You're correct in that it did not solve the problem, so...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
February 19, 2009 at 7:54 am
I investigated the possibility of parameter sniffing, so I changed the function from an Inline Function to a multi-line function yet the problem persists. I've attached the code for...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
February 19, 2009 at 7:03 am
It is indeed an inline statement that contains 3 CTEs and a final query referencing the CTEs. As I mentioned, when I pull the code out to a separate...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
February 19, 2009 at 6:25 am
Brian,
It's an interesting approach and one that I wish I could use, however this doesn't allow me to establish conditional matching as well. Therefore, I'm attempting to do record...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
February 18, 2009 at 2:47 pm
gcopeland (1/9/2009)
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
January 9, 2009 at 3:07 pm
gcopeland (1/9/2009)
GSquared (1/9/2009)
The way that Gates and Ballmer dress is considered socially appropriate for executives. It says nothing whatsoever about technical skill. You're concatenating two thoughts...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
January 9, 2009 at 2:49 pm
Ron Kunce (1/9/2009)
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
January 9, 2009 at 11:58 am
D Smith (1/9/2009)
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
January 9, 2009 at 11:30 am
crussell (1/9/2009)
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
January 9, 2009 at 11:23 am
I believe that you need to dress to fit the situation. In my position, we wear casual business dress (dockers & polos) with jeans on Friday. However, regardless...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
January 9, 2009 at 6:59 am
Similar to Sergio's solution, mine breaks down an age into quarterly periods (three months), also accounting for leap year, so partial ages can be compared:
ALTER FUNCTION [dbo].[fnCalcAge] (@DOB datetime, @CurrentDate...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
June 30, 2008 at 5:54 am
Viewing 15 posts - 376 through 390 (of 397 total)