Viewing 15 posts - 48,721 through 48,735 (of 59,093 total)
karthikeyan (8/11/2008)
why can't we use Tally or Number table ?
My approach :
Select REPLICATE('1',N),N
from Tally,NUM
where N <= 6
and NumberValue = 1
union all
select REP,N from (Select REPLICATE('1',N) as REP ,N
from Tally,NUM
where...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 8:46 pm
Hi Trevor...
It's odd that you must use a While loop instead of a cursor because a cursor uses a While loop! They both suck performance dry. 🙂
I'd recommend that...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 8:32 pm
Niyala (8/11/2008)
I am getting the following deadlock message, but I could not figure out what the mentioned rate is.
DBSPI-3271.1: Deadlocks rate for object _Total (110.00/sec) too high (>=3.00/sec)
I...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 8:00 pm
... and it will require a change to your front end statement. You will need to select from the indexed view, instead.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 7:59 pm
You might be able to get a whole lot more retrieval speed if you created an Indexed View. Be warned that an indexed view can slow down inputs some.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 7:52 pm
I believe the first sheet of an Excel file can be referred to as Sheet1$ regardless of it's actual name.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 7:46 pm
pockeyfan (8/14/2008)
Thanks for your suggestion!I'm new to SQL and SP, will read the article to see whether I could apply it in my case...
Tally table won't do it, in this...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 7:40 pm
Lester Policarpio (8/13/2008)
And also please read the article...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 7:17 pm
Heck... I wouldn't even use the WHILE loop... it's RBAR. Most WHILE loop solutions are because someone doesn't know T-SQL well enough to come up with the proper set...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 7:05 pm
Loner (8/13/2008)
The one you posted for SQL Server 2000 worked liked...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 7:00 pm
You can get by without creating the extra temp table...
SELECT d.Name,t.N*10 AS DeciCount
FROM (SELECT Name,COUNT(*) AS TheCount
...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 6:53 pm
Lian Pretorius (8/12/2008)
karthikeyan (8/12/2008)
Hey Trevor,I have tested the below script, It is giving perfect result.
Same here.
Trevor, Karthik's script above uses a temp table - Which cannot be used in view's...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 6:45 pm
It means "DataBase Owner" and is a server role. Lookup server roles in Books Online.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 6:39 pm
sqlindia (8/12/2008)
Hi AllI want to list out columns name of SP into a table. They can be dynamic.
Thank in advance
sonny
I'm pretty sure this can't be done reliably. Sure,...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 6:38 pm
I guess I'd have to ask... what does the CLR and the C# function do?
--Jeff Moden
Change is inevitable... Change for the better is not.
August 17, 2008 at 6:17 pm
Viewing 15 posts - 48,721 through 48,735 (of 59,093 total)