Viewing 12 posts - 1 through 12 (of 12 total)
TheSQLGuru (5/25/2016)
Come now - I know you could have figured this one out by extending what I had!! 😛
You scared the crap out of me with that second post w/DENSE_RANK,...
May 25, 2016 at 12:48 pm
TheSQLGuru (5/25/2016)
I need all expected outputs for your sample data.
NEWIDFROMIDTOIDFROMRELATIONTORELATIONNOTESSTATUS
1CMTNAA0015DQCMTNAA0012QTMother-in-LawSon-in-LawIn, LawActive
2AMTNAA000QGCAMTNAA000K3SClientVendorSunglassesActive
May 25, 2016 at 12:25 pm
TheSQLGuru (5/25/2016)You are very welcome. When you have 45000 hours working with SQL Server your brain will probably think like mine too. 😎
I've been off in force.com land and haven't...
May 25, 2016 at 12:06 pm
drew.allen (5/25/2016)
Here is another approach. This has the advantage that it accounts for orphaned records.Drew
Thanks Drew! In this case we don't want the orphans; I know, not ideal but...
May 25, 2016 at 12:02 pm
TheSQLGuru (5/25/2016)
You see how I set up the sample data? You do the work to set up the next set of sample data and what your expected output is. Be...
May 25, 2016 at 11:59 am
Wow Kevin, that's like light years beyond my sql skills, thanks a ton!
So I have 4 other fields in mix that I need to bring along and your solution is...
May 25, 2016 at 11:13 am
Kevin,
It doesn't matter which one of the ENTITYID's is the To or From. Maybe just use the 1st row as From if that works?
May 25, 2016 at 10:38 am
When I join the table to itself, I end up with two rows since each row has it's sibling as the BACKAFFILID.
AFFILIATION INNER JOIN AFFILIATION AS AFFILIATION_1 ON AFFILIATION.BACKAFFILID =...
May 25, 2016 at 10:30 am
Thanks for everyone's input... I got it:
Service INNER JOIN Fiscal ON SDATE BETWEEN DATEADD(d, -6, WEEKEND) AND WEEKEND
April 6, 2011 at 10:42 am
sunitabeck (4/2/2011)
April 6, 2011 at 10:10 am
parthi-1705 (4/5/2011)
Sturev (4/2/2011)
How you are doing for November month?
i.e say service date...
April 6, 2011 at 10:06 am
homebrew01 (4/2/2011)
Sturev (4/2/2011)
I have a need to pull a date column from one table based on the date in another.1/2/2010 is greater than 12/30/2009, so why doesn't > work ?
There...
April 6, 2011 at 10:05 am
Viewing 12 posts - 1 through 12 (of 12 total)