Viewing 15 posts - 61 through 75 (of 256 total)
This works as well and probably faster than my first post. I like the windows function approach as well. Probably many ways to skin this cat. I'm waiting for some...
December 11, 2015 at 6:56 am
I have been drinking a few beers. Here is my answer but I'd advise for one of the other gents on here to give you a higher performing one as...
December 10, 2015 at 7:59 pm
Sean Lange (12/1/2015)
SELECT *
FROM #Patient P
INNER JOIN #Test...
December 1, 2015 at 1:00 pm
Thanks Jacob,
Those both work. I have this just now but not sure how performance would be. Aliasing the Patient table into 2 different tables.
SELECT p.*, pot.TestName, cal.TestName
FROM #Patient P
INNER JOIN...
December 1, 2015 at 12:39 pm
Thanks Sean,
I am trying to get all patients that had both a Potassium and a Calcium test. Which should be all 4 people.
December 1, 2015 at 12:26 pm
Yes, good insight. I ended up creating a Permanent table with many, many more mappings in it. I also switched to LEFT JOIN so I will catch things missed in...
November 13, 2015 at 2:59 pm
I did this and it works, however I would like to see if anyone has a better idea or method.
I created a mapping table then did wildcard joins. I'm sure...
November 12, 2015 at 6:02 pm
Hi Allan,
The format in the date column I am filtering on is like this YYYYMMDD
Your code seems to be working perfectly though in my report query.
Thanks!
October 26, 2015 at 10:21 am
Yes sir that is correct. Wow, I love it I knew their was a better way!
Thanks Alan!!
October 26, 2015 at 10:02 am
Thanks so much for the feedback !
All of the solutions worked however after seeing John Mitchell-245523 CROSS JOIN solution and testing it for my self I am abandoning the Recursive...
September 21, 2015 at 8:04 am
What about NTILE in a Windows function? Would that work in your scenario?
September 20, 2015 at 12:12 pm
Going to take a look at the execution plans now.
Only two allowable choices 1 or NULL nothing else.
September 8, 2015 at 8:35 am
Thank you all for the wonderful information. I should have also relayed more information than I did. It does seem that Jeff touched some on my situation with this table.
Unfortunately...
September 8, 2015 at 8:19 am
Using the WHERE with the IN() will require a split function.
I'll get creamed for saying this but you could use a catch all query.
In your query choices '-1' AS Value,...
July 23, 2015 at 8:45 pm
Jason A. Long (5/30/2015)
May 30, 2015 at 2:15 pm
Viewing 15 posts - 61 through 75 (of 256 total)