Viewing 15 posts - 2,851 through 2,865 (of 2,893 total)
1st create indices for you FK columns.
Adding indices for all columns used in a query also would probably increase performance of your select, but think about insert operation... Read something...
May 21, 2010 at 9:45 am
And what I wanted was:
select ID
,dbo.MostCommonValue(Field1)
,dbo.MostCommonValue(Field2)
,dbo.MostCommonValue(Field3)
,dbo.MostCommonValue(Field4)
,dbo.MostCommonValue(Field5)
from #t_temp
group by ID
Easy hey?
Now, only what is left is just to write CLR.
OK, it may be not the best implementation, but...
Here...
May 21, 2010 at 9:36 am
I would create aggregate CLR function for this in C#.
May 20, 2010 at 9:57 am
As I said before, it would be VERY helpfull if you provide the create table and data insert script together with the question.
Are you asking about:
required function needs...
May 20, 2010 at 9:49 am
I wonder if Jeff Moden ever experienced this issiue and have better explanatino of why this happens.
Will hope that he will read this post and comment on it...
May 20, 2010 at 7:34 am
Proof?
That will not be easy. The only thing I can tell that we have experienced such "nice" features of SQL while I was participating in one of the Microsoft case...
May 20, 2010 at 7:30 am
Have you aware had the division by zero error in the code like that:
SELECT A/B FROM TABLE1 WHERE B!=0
No? Welcome to Microsoft SQL Server version 2005 and higher query optimiser.
IT...
May 20, 2010 at 7:15 am
No Ideas. Create table & data population scripts together with better explanation of expected results would help to generate some...
Your expected results are not very clear: what you refer as...
May 20, 2010 at 6:21 am
This one (without use of cursor or loops opr UDF) will perform and scale much better...
declare @pInput varchar(max)
declare @n int
set @pInput = '1:1,3,5,7,4:56,43,58,5:34,67r,234'
set @pInput = ',' + @pInput +...
May 20, 2010 at 6:16 am
Sorry, can not help here.
Please provide create table and data insert script plus better explanation of expected results (as list of desired data in the table after the insert/update/delete...
May 20, 2010 at 6:03 am
I wanted to write an articale about using Tally table for cursor-less string splitting but it was already done by Jeff Moden: http://www.sqlservercentral.com/articles/T-SQL/62867/
You can find there that you could create...
May 20, 2010 at 6:00 am
try this:
declare @pInput varchar(max)
set @pInput = 'A123,B123,C123,D123,E123,F123'
;with split
as
(
select CASE WHEN LEN(@pInput)= 0 THEN ''
...
May 20, 2010 at 5:53 am
I can suggest cursor-free and UDF-free string split functionality :
declare @pInput varchar(max)
set @pInput = 'A123,B123,C123,D123,E123,F123'
;with split
as
(
select CASE WHEN LEN(@pInput)= 0 THEN ''
...
May 20, 2010 at 5:19 am
Do you want to select the next date after the MIN, that query will do it:
declare @dt table (dt datetime)
insert @dt select '20090101'
union select '20090210'
union select...
May 15, 2010 at 5:13 pm
How you call your SP from Access?
From SQL Server prospective, it is expected behaviour. The error is raised, query/sp execution stopped (conversion error will terminate your query or sp), empty...
May 15, 2010 at 5:03 pm
Viewing 15 posts - 2,851 through 2,865 (of 2,893 total)