Viewing 15 posts - 16 through 30 (of 39 total)
Lee Crain (10/29/2012)
Don.,Are you using a Touchstar system database?
Hi Lee,
Its for a CMS product called Goldmine.
October 29, 2012 at 12:52 pm
I'll have a read.
Thanks Chris.
October 28, 2012 at 4:35 am
ChrisM@home (10/28/2012)
Thanks for the feedback, Don. The script in bold - is it the 2000-compatible one?
Morning Chris,
It was the following script you gave me help with:
SELECT c.*, h.*
FROM...
October 28, 2012 at 4:02 am
ChrisM@home (10/17/2012)
Eric M Russell (10/15/2012)
If Don has time, it would be interesting to know how this triangular join method compares to the aggregate methods. With small partitions it could be...
October 28, 2012 at 3:46 am
yeshupandit_2002 (10/26/2012)
Hmmm but what if Skills are in different numbers for each ACCOUNTNO
Hi yeshupandit,
The contacts I have to report on do have differing amounts of skills.
I've used Cadavre's example and...
October 27, 2012 at 11:59 am
Cadavre (10/25/2012)
Have a read through Cross Tabs and Pivots part 1[/url] and Cross Tabs and Pivots part 2[/url] by Jeff Moden if you need further help.
Hi Cadavre,
Your first example is...
October 27, 2012 at 11:55 am
Hi Guys,
I'll try and make some time during the week to have a play with this and report back. Otherwise I'll spend some time over the weekend.
Thanks again, for all...
October 17, 2012 at 10:03 am
Eric M Russell (10/15/2012)
Don. (10/13/2012)
Unfortunately neither of those scripts worked as there are multiple identical accountno and lastdate fields. Ideally Id need to filter on the History tables Recid...
October 16, 2012 at 4:36 am
ChrisM@home (10/14/2012)
Don. (10/12/2012)
I'd like to get the join the tables, but only show the most recent record in History.
Why HR1? HR3 is on the most recent row. Assuming you mean...
October 14, 2012 at 5:22 am
L' Eomot Inversé (10/13/2012)Do you expect to get that? There's nothing in what you've told us about what you are doing that tells us that getting HR3 and HR5...
October 14, 2012 at 5:14 am
Hi Guys,
Unfortunately neither of those scripts worked as there are multiple identical accountno and lastdate fields. Ideally Id need to filter on the History tables Recid field.
I've dummied up some...
October 13, 2012 at 4:16 pm
How would I go about selecting a distinct recid from History?
While the script below does return the correct data, when we join it on accountno and lastdate, it will include...
October 13, 2012 at 4:32 am
DiverKas (10/12/2012)
SELECT c.Accountno,C.Company,C.Contact,C.Recid,H.lastuser,H.lastdate
FROM contact C
LEFT JOIN history h ON C.accountno=h.accountno
LEFT JOIN (SELECT accountno,MAX(lastdate) AS lastdate
...
October 12, 2012 at 3:12 pm
Chris that looks almost perfect, thank you. (Needed x instead of h in the initial select)
SELECT c.*, x.*
FROM Contact c
OUTER APPLY (
SELECT TOP 1 h.*
FROM History h
WHERE h.Accountno =...
October 12, 2012 at 10:31 am
ChrisM@Work (8/16/2012)
Something like this:
SELECT
Company,
AVG_MatchedToSent = AVG(DATEDIFF(hour,Matched_Date, Sent_Date))
FROM YourTable
GROUP BY Company
Thanks for the suggestion.
I had to get a bit more complicated though as some of my date fields didn't...
August 21, 2012 at 9:34 am
Viewing 15 posts - 16 through 30 (of 39 total)