Viewing 15 posts - 556 through 570 (of 1,229 total)
Evil Kraig F (1/20/2012)
ChrisM@home (1/20/2012)
January 21, 2012 at 12:44 am
Evil Kraig F (1/20/2012)
ChrisM@home (1/20/2012)
Evil Kraig F (1/20/2012)
ChrisM@home (1/20/2012)
January 20, 2012 at 4:22 pm
Evil Kraig F (1/20/2012)
ChrisM@home (1/20/2012)
- don't treat a problem as islands-n-gaps if it isn't, because whatever method you use to resolve it, it's going to cost you.
Chris,
The only problem with...
January 20, 2012 at 2:28 pm
It was worth spending a little time on this to compare island-n-gap resolution by conventional means against a rCTE method.
Firstly, this thread isn't island-n-gaps because the sequence column is...
January 20, 2012 at 2:00 pm
Evil Kraig F (1/19/2012)
ChrisM@home (1/19/2012)
Evil Kraig F (1/19/2012)
s.njenga (1/18/2012)
January 19, 2012 at 12:22 pm
Evil Kraig F (1/19/2012)
s.njenga (1/18/2012)
Your query is only referencing @introwno ones instead of referencing all rows in the staging table without having to loop through each row.
If that's in reference...
January 19, 2012 at 11:42 am
L' Eomot Inversé (1/18/2012)
Jack Corbett (1/18/2012)
January 19, 2012 at 7:23 am
Evil Kraig F (1/18/2012)
Roughly sure this is what you need:
You're missing an AND from the BETWEEN in the cross apply 😉
January 18, 2012 at 3:12 pm
Evil Kraig F (1/18/2012)
January 18, 2012 at 3:05 pm
And next, for speed, convert this:
+ ' and CONVERT(varchar(4),RETAIL_SALES.YR) + Right(''0'' + CONVERT(varchar(3),RETAIL_SALES.MO),2) + CONVERT(varchar(1),RETAIL_SALES.WK) <= ''' + @EndDate + ''''
to something like this:
AND RETAIL_SALES.YR = YEAR(@EndDate ) etc
which...
January 18, 2012 at 2:10 pm
jayw-1061726 (1/18/2012)
I was missing the space. Thanks Chris.
You're welcome, thanks for the feedback. Just out of curiosity, why are you using dynamic SQL for this? Is there a chunk of...
January 18, 2012 at 1:37 pm
Dave Ballantyne (1/18/2012)
agreed sp_executesql should *always* be used. But quite why dynamic sql is even being used here is anyones guess 🙂
I'd guess it's not the whole picture, Dave.
January 18, 2012 at 1:35 pm
It may be a missing space between the FROM and the WHERE.
The easiest way to find out is to print the full string, copy and paste it into a...
January 18, 2012 at 11:56 am
jennigirl (1/18/2012)
January 18, 2012 at 8:38 am
Viewing 15 posts - 556 through 570 (of 1,229 total)