Viewing 15 posts - 1,396 through 1,410 (of 2,038 total)
Bruce W Cassidy (4/13/2009)
Florian Reischl (4/13/2009)
I thought about the CTE while typing the sub-query. I just determined that, in this case, the sub-query is simple enough that it stays readable.Greets
Flo
[font="Verdana"]Agreed...
April 13, 2009 at 4:22 pm
RBarryYoung (4/13/2009)
Paul White (4/13/2009)
RBarryYoung (4/13/2009)
April 13, 2009 at 4:19 pm
Lynn Pettis (4/13/2009)
I understand needing to work with NVARCHAR(MAX). I was trying to find out why the Tally solution may have been slower, and I think the reason is...
April 13, 2009 at 4:07 pm
Lynn Pettis (4/13/2009)
I think the reason the Tally version is slower has to do with the blob data type, nvarchar(max).I posted some information in The Thread.
Hi again
I just tested with...
April 13, 2009 at 4:02 pm
Lynn Pettis (4/13/2009)
I think the reason the Tally version is slower has to do with the blob data type, nvarchar(max).I posted some information in The Thread.
Hi Lynn
Thanks for your feedback!...
April 13, 2009 at 3:51 pm
Hi
I'm not sure if i got you. This?:
ORDER BY sort, Central, Northeast, Middlewest, Northwest, Southeast, Southwest
Greets
Flo
April 13, 2009 at 3:48 pm
I thought about the CTE while typing the sub-query. I just determined that, in this case, the sub-query is simple enough that it stays readable.
Greets
Flo
April 13, 2009 at 3:45 pm
RBarryYoung (4/13/2009)
--- ==========================================================
--- -> Tally/fUNCTION solution
PRINT 'Start Tally-function 3 solution (correct line-splitting)'
SELECT @now = GETDATE()
--- Split...
April 13, 2009 at 3:43 pm
Good morning Paul! (every time I see your first posts I know it's time for bed 🙂 )
Paul White (4/13/2009)
April 13, 2009 at 3:32 pm
Hi John
John Deupree (4/13/2009)
1. Would you consider this DB to be a relational DB, albeit poorly designed?
The database is relational but not of integrity 😉
2. Is there any performance gain...
April 13, 2009 at 3:13 pm
Hi foxjazz
A temp table is a valid solution. You can also use a sub-select to avoid the overhead with the temp table.
Try this sample:
DECLARE @t TABLE
(
ProductId INT,
...
April 13, 2009 at 2:59 pm
sreddy (4/13/2009)
--------------------------------------------------------------------------------
select
user.userid,
user.name,
count(news.userid)
from user
inner join news on user.userid = news.userid
group by user.userid,
user.name
Why count(userid)?
j1a4l0: What do you want returned for a user that has no news items?
--------------------------------------------------------------------------------
Gail Shaw
thats...
April 13, 2009 at 2:53 pm
Hi
You can use a CTE. Include a UNION ALL for your data and their SUM values. In addition add a sort column to ensure that the Totals are always on...
April 13, 2009 at 2:49 pm
Hi Bruce
Bruce W Cassidy (4/13/2009)
April 13, 2009 at 2:39 pm
Jeff Moden (4/13/2009)
Florian Reischl (4/13/2009)
Jeff Moden (4/13/2009)
I'm thinking that the hey-day of the Tally table have finally been replaced by faster methods.
Don't say that. There might be actually two business...
April 13, 2009 at 2:34 pm
Viewing 15 posts - 1,396 through 1,410 (of 2,038 total)