Viewing 15 posts - 14,161 through 14,175 (of 26,486 total)
Welsh Corgi (11/3/2011)
Lynn Pettis (11/2/2011)
November 3, 2011 at 12:37 pm
Read the first two articles I reference below in my signature block.
November 3, 2011 at 12:07 pm
Does this do basically what you are looking for?
create table #Account (
AccountNo int,
RepCode char(4)
);
create table #Accountdim (
...
November 3, 2011 at 10:36 am
Also what indexes exist on both tables as well as if there are any foreign keys defined.
November 3, 2011 at 9:30 am
Might be useful to see the actual execution plans.
November 3, 2011 at 9:28 am
garethmann101 (11/3/2011)
November 3, 2011 at 9:04 am
Paraphrasing here.
You want the current info from Account, but you want the last record from Accountdim before the RepCode changed to what is in Account, correct?
November 3, 2011 at 8:55 am
ankita.patel01 81294 (11/3/2011)
i know i missed to include this,...
November 3, 2011 at 8:07 am
raotor (11/3/2011)
I am new to SQL and am slowly llearning, so please forgive me if I ask a dumb question.
I was reading through a couple of articles on the web...
November 3, 2011 at 7:51 am
Here is another option:
with cte_maxacc as (
select
acc.AccountNo,
acc.RepCode,
max(ad.CurrentDate) as MaxDate
from
dbo.Account acc
inner...
November 2, 2011 at 3:58 pm
David Moutray (11/2/2011)
;WITH [PreviousUpdate]
AS
( SELECT AccountNo
,MAX(RecordDate) AS...
November 2, 2011 at 3:40 pm
Fixed my code a bit:
with cte_Accountdim as (
select
AccountNo,
RepCode,
CurrentDate,
row_number() over (partition by AccountNo order by...
November 2, 2011 at 3:37 pm
Try this for a starting point.
with cte_Accountdim as (
select
AccountNo,
RepCode,
CurrentDate,
row_number() over (partition by AccountNo order...
November 2, 2011 at 3:28 pm
elkucho (11/2/2011)
So if the records doesn't exist it will do to a OLD DB Destination, right ?
But if it does exist, what is the next component after...
November 2, 2011 at 3:17 pm
First, I'll look at the date manipulations a bit later. Looks like the date manipulation code in my blog on ssc is just what you need with some minor...
November 2, 2011 at 3:15 pm
Viewing 15 posts - 14,161 through 14,175 (of 26,486 total)