Viewing 15 posts - 1 through 15 (of 26 total)
I kind-of see what you did with that. You split my inner-most 'union all' query into two parts. The top with 5 case statements totaling sums and 'unioned'...
February 15, 2012 at 4:01 am
Sorry I'm not the best at describing.
The "colA" I keep joining the table on itself is unique and I treat it as the 'primary key'. It would be easier...
February 14, 2012 at 9:59 pm
Thanks for the help guys. I'm sorry it was so simple, and that simplicity took me so long to find.
Do I mark this thread as 'resolved' somehow?
February 12, 2012 at 8:06 pm
Thanks Jeff.
The problem is my test code must not adequately reflect the issue I'm having. My issue is still separating the 'sums' as I posted just prior to your...
February 11, 2012 at 10:05 pm
Lutz,
Thank you. However, when I tried this before, it counts the distinct numbers in colB as 1 group and does not add them to the others for the same...
February 11, 2012 at 8:30 pm
Don't mistake the word hacker, if that's the problem. I'm certain of what I said. I cannot create or delete or update or do any administrator function in...
February 11, 2012 at 5:23 am
No I do not have rights to create a table. I'm a pharmacist working at a hospital. I only have access to our health care operating systems database...
February 11, 2012 at 4:44 am
Well this is my first time ever, and I'm looking at someone else's code. But, just for you Jeff!
create table tab(
colA varchar(7),
colB int)
go
insert into tab(colA,colB)
select 'aaa','2' union all
select 'aaa','3'...
February 11, 2012 at 4:26 am
Thanks guys. I looked at those suggestions for a good while trying different things, but couldn't figure out how to utilize them quite like I hoped. I spent...
July 29, 2011 at 4:29 am
@mister.magoo- TY sir, this style query worked well for my current needs and is simple enough for me to wrap my head around after thinking about what it is saying...
July 19, 2011 at 10:35 pm
OK, I'm getting closer, but still need help. Here's what I have:
select DrugID,InventoryID
from DPhaDrugInventories a
where exists (select distinct b.DrugID from DPhaDrugInventories b where a.DrugID = b.DrugID
and b.InventoryID =...
July 17, 2011 at 10:18 pm
My bad. You are correct in that my description is lackluster. The exact definition of what I need hasn't come to my attention yet, which is why I'm...
July 16, 2011 at 12:50 am
You da man. That worked really great except I didn't explain enough of what I needed. Here's what I have:
select a.DrugID,a.InventoryID from DPhaDrugInventories a
where exists (select * from...
July 15, 2011 at 3:44 am
Ya a BSPharm is a bachelors and the PharmD is a doctorate. Actually, since 2003 or so there are only PharmD degrees available, the BS has gone by the...
March 2, 2011 at 6:55 pm
Thanks Rich. How did you know I was a PharmD and not BS-Pharm? I appreciate your comment, it made me smile.
I hope to someday get a good position...
March 2, 2011 at 2:18 am
Viewing 15 posts - 1 through 15 (of 26 total)