Viewing 15 posts - 2,641 through 2,655 (of 3,008 total)
Maybe there a message box popping up. Since there is no GUI interface, there is no way to respond to it, and it would just wait until you kill...
November 19, 2007 at 1:05 pm
Jeff, you have to force the conversion to numeric before the division operation.
This code shows that with a check for divide by zero also.
select
income,
expense,
[Percent] = ((income-expense+0.00)/nullif(income,0))*100.0
from
(
-- Test Data
select income =4,...
November 19, 2007 at 12:45 pm
I have a really simple solution, but I'm just to lazy to post it.
November 15, 2007 at 12:58 pm
Take a look at the script on the link below. It will return a detailed analysis of all database files on a server.
Get Server Database File Information
November 14, 2007 at 3:45 pm
From SQL Server Books Online:
"For stored procedures, SQL Server uses the SET ANSI_NULLS setting value from the initial creation time of the stored procedure. Whenever the stored procedure is subsequently...
November 14, 2007 at 2:56 pm
The only time you should have a database without foreign keys is when there are no logical relationships between the entities that your data represents.
In other words, never.
November 14, 2007 at 2:44 pm
Run the script on the following link to see where the space is being used.
Script to analyze table space usage:
November 13, 2007 at 2:27 pm
These all give me the same query plan:
select * from authors where au_id <> '172-32-1176'
select * from authors where au_id != '172-32-1176'
select * from authors where not au_id = '172-32-1176'
November 9, 2007 at 8:57 am
This method seems simple enough:
select
[DateTime] = convert(datetime,stuff(a.DT,13,8,''))
from
-- Test Data
(
select DT= '14:52:17.376 CET Wed Oct 8 2007' union all
select DT= '14:54:00.737 CET Wed Oct 8 2007' union all
select DT= '14:08:53.213 CET...
November 8, 2007 at 3:15 pm
select
current_execution_status
from
openrowset('SQLOLEDB','SERVER=(LOCAL);Trusted_Connection=yes;',
'set fmtonly off;execute msdb.dbo.sp_help_job') rmt
where
name = 'My Job Name'
November 8, 2007 at 3:03 pm
This code shows how to convert a date to an Academic Year starting on September 1 of each year.
select
a.MyDate,
[Academic Year] = year(dateadd(mm,-8,a.MyDate))
from
MyTable a
where
a.MyDate between '20070831' and '20080902'
Results:
MyDate ...
November 8, 2007 at 8:54 am
The function on the link below is designed for loading a date table.
Date Table Function F_TABLE_DATE
November 6, 2007 at 4:05 pm
A 78 GB log file for a 3 TB database is less than 3% the size of your data, so that seems far too small. You probably need 10% or...
November 5, 2007 at 12:46 pm
Just sounds like a stupid example. If you are doing log backups, you want to do them often.
November 1, 2007 at 1:34 pm
Viewing 15 posts - 2,641 through 2,655 (of 3,008 total)