Viewing 15 posts - 496 through 510 (of 1,132 total)
The name for what you are attempting to do is a PIVOT. Please be sure to check the value of the constants as a typo is probable.
SELECTv_R_System.Name0
,MAX ( CASE...
May 9, 2008 at 9:40 pm
"paging seems to be the problem"
Do you mean windows paging ? Is there anything running on the server other than SQL Server?
May 9, 2008 at 4:48 pm
"A company I know of "
Good - I hope that means you are not an employee, so I do not need suggesting updating your resume.
This is going to be implemented...
May 9, 2008 at 4:36 pm
Or the object is not a table !
create procedure dbo.MissingTable
as
select 'hello world
go
select * from SYSOBJECTS where name = 'MissingTable'
go
select * from dbo.MissingTable
go
drop procedure dbo.MissingTable
May 9, 2008 at 2:45 pm
"Because the database will be handling different companies, with their own schema."
That is the wrong solution to the problem. Have one database for each company and each login has...
May 9, 2008 at 2:42 pm
The correlated sub-query is definitely the culprit but there may not be an alternative, but try the last SQL statement below.
if object_id(N'sparseData') is not null ...
May 9, 2008 at 2:17 pm
[font="Comic Sans MS"]If there is exactly one call and exactly 1 dropped call, then the result of the caculation will be 100.00 % but drop rate is defined as numeric(3,2),...
May 9, 2008 at 9:44 am
For error handling, please be sure to read Erland Sommarskog's article at
http://www.sommarskog.se/error-handling-I.html
In short, catch/try only works for some errors and I do not recommend any error checking inside of SQL...
May 9, 2008 at 6:58 am
The CTE solution, while elegent, does suffer from a higher resource utilization as the number of element increases. Here is an example with 887 elements.
SET STATISTICS IO ON
SET...
May 7, 2008 at 6:45 am
From the article, you wrote " Tally table .. starting at 0 or 1 (mine start at 1)"
There are advantages for having the Tally table include 0 and the...
May 7, 2008 at 4:39 am
Another great article ! Thanks
The first reference for a tally table that I can recall is in "Guide to Sybase and SQL Server" by C. J. Date and D.McGoveran...
May 7, 2008 at 4:06 am
" I have alert that exec a job but I don't know how to pass the alert message to the job."
The documentation regarding alert tokens ( variables ) is well...
May 2, 2008 at 8:41 am
Here is a stored procedure to list the resource usages for a given interval of time:
create PROCEDUREsp_resources
(@WaitSeconds TINYINT = 3
)
AS
SET NOCOUNT ON
SETXACT_ABORT ON
declare@WaitTimechar(8)
SET@WaitSeconds = 3
SET@WaitTime = '00:00:' +...
May 2, 2008 at 7:19 am
Under SQL Server 2000, "sys.sysprocesses" is not a known table and you should use "master.dbo.sysprocesses".
May 1, 2008 at 6:01 am
"SAN-to-SAN replication can account for cache contents during the replication process and at the time of a disastrous shutdown of the primary machine."
You do not need to worry about the...
April 30, 2008 at 12:36 pm
Viewing 15 posts - 496 through 510 (of 1,132 total)