Viewing 15 posts - 26,206 through 26,220 (of 26,487 total)
You ar doing integer division, so you will always get 0. Try this:
cast(datediff(dd, start_date, getdate()) as decimal)/cast(datediff(dd, start_date, end_date) as decimal)
March 2, 2007 at 2:25 pm
I am not using Backup Exec, however, if you are only doing full backups, and the database is in Full Recovery, Bullk Logged modes, your transaction log will continue grow. ...
February 16, 2007 at 7:54 am
Okay, I stand corrected. I just never ran into a problem using yyyy-mm-dd format.
February 14, 2007 at 9:48 pm
Problem is your convert statement, should be:
CONVERT(datetime, '2/8/2007')
If you are using a datetime in string format, you really should code it this way: 'yyyy-mm-dd'
This will work regardless of the dateformat...
February 14, 2007 at 12:59 pm
It depends. Not what you wanted to here is it? How you index a table depends on how it will be queried. If all queries are either by Company_ID only...
February 14, 2007 at 11:29 am
The identity field of the temp table is the sortkey. The data is inserted in the required sort order for each sort requirement. The sort by the sort key after...
February 12, 2007 at 4:34 pm
Just create a job that does what you want and schedule it to run when you need it.
No need for all the rest.
February 12, 2007 at 6:09 am
Actually, not having put any test code together, I didn't think of making sure about only selecting disinct Customer Id's. I just looked at what it would take to create...
February 10, 2007 at 9:15 pm
Try something like this using a derived table:
select
dt.PossibleDate,
dt.CustomerId,
or.WeekDate,
or.OrderQty
from
(select
pd.PossibleDate,
o.CustomerId
from
dbo.tblPossibleDates pd
cross join dbo.tblOrders o) dt
left outer join dbo.tblOrders or
on (dt.PossibleDate...
February 9, 2007 at 4:18 pm
Before deleting the builtin\Administrators group, be sure you have at least 2 if not 3 alternative ways to login to your SQL Server instance with sys admin privledges, and that...
February 9, 2007 at 4:04 pm
Try something like this:
create table dbo.MyTable (
Account varchar(10),
Amount money,
Code int
)
go
--Acct Amount Code
insert into dbo.MyTable(Account, Amount, Code) values ('1',100,1)
insert into dbo.MyTable(Account, Amount, Code) values ('2',200,1)
insert into dbo.MyTable(Account,...
February 9, 2007 at 11:58 am
Does sound like you need a trigger, but a scheduled job to accomplish a specifc task or set of tasks. Triggers are fired on a table in response to an...
February 9, 2007 at 11:18 am
Not sure I would go that way, especially with SQL Server 2005. You could go this direction: A "single database", partitioning the databased on the unique customer id. To enhance...
February 9, 2007 at 11:13 am
You don't need the AWE on 64-bit machines running the 64-bit versions of the OS and SQL. As for how to assign the processors, don't know. My 64-bit machines ar...
February 8, 2007 at 7:32 pm
The only other thing I can think of is deleting the servers from SSMS and register them with his username and password. It sounds like a permissions issue with SQL. ...
February 8, 2007 at 7:23 pm
Viewing 15 posts - 26,206 through 26,220 (of 26,487 total)