Viewing 15 posts - 586 through 600 (of 683 total)
Vikas,
Try this:
if update(StatusId2)
update mytable
set = ' Old StatusId2: ' + d.StatusId2
from mytable mt
join deleted d on d.PrimaryKeyField = mt.PrimaryKeyField -- change to correct column
and d.StatusId2...
April 11, 2006 at 5:13 am
Shane,
Try this:
declare @time1 datetime
declare @time2 datetime
set @time1 = '10:00:00'
set @time2 = '11:00:00'
select SUM(DATEDIFF(MI,stoptime, case when starttime <= @time2 then starttime else @time2 end)) AS 'Downtime'
from
where stoptime = @time1
Hope...
April 11, 2006 at 5:05 am
select d.DepartmentName, e.EmpName, e.EmpAdd, e.DepartmentId, ...etc
from Department d
join Employee e on e.DepartmentId = d.DepartmentId
March 7, 2006 at 7:21 am
Hi Rama,
Checkpoints occur automatically and they occur on a frequency that is based on the recovery interval.
Look for "Checkpoints and the Active Portion of the Log" in BOL for a...
March 7, 2006 at 2:20 am
The problem is in the way that you are building the string for the dbcc shrinkfile.
You're performing the select from sysfiles outside of the dynamic sql so it will always...
March 3, 2006 at 3:56 am
Hi,
You can do this as follows:
update my_table
set user_name = replace(user_name,'ext-','')
This will replace all occurrences of the string 'ext-' with the blank string ''. You have to be sure that...
March 3, 2006 at 3:36 am
run:
sp_dropserver 'computer-2'
go
sp_addserver 'computer-1','local'
go
restart sql server services.
March 2, 2006 at 3:16 am
Hi,
Try this:
declare @yesterday datetime
declare @today datetime
set @yesterday = convert(datetime,convert(varchar(11),dateadd(dd,-1,getdate()),106) + ' 15:00:00.000')
set @today = convert(datetime,convert(varchar(11),getdate(),106) + ' 08:00:00.000')
SELECT PONum
FROM PO
WHERE
POStatusDate > @yesterday AND POStatusDate < @today
Hope that helps,
February 27, 2006 at 8:26 am
Hi Julian,
There is a good example in BOL on how to expand hierarchies and show all of the children for a given parent without using recursion. You want to...
February 27, 2006 at 8:14 am
Sure,
Just do a select * from
February 27, 2006 at 5:53 am
Hi Gabor,
This depends on the order of the clustered index. If it is ascending, the null values will be at the beginning. If it is descending, the null...
February 27, 2006 at 4:02 am
You first of all have to change the Windows server name. And then you have to change the SQL Server name in the same way you already pointed out,...
February 27, 2006 at 3:58 am
The number 120 relates to the style you want to apply. In this case, it is yyyy-mm-dd hh:mi:ss(24h).
Have a look in books online for CAST and CONVERT. It...
February 27, 2006 at 3:55 am
You want something like this. I haven't tested this out but you should get the general idea.
create #a_temp_table
(item_id int)
declare @item_id int, @location int, @qty int, @new_location int
set @new_location =...
February 27, 2006 at 3:52 am
Hi Eric,
Unfortunately there isn't any table that tells you what variables have been declare inside the sp. You can find the variables that have been declare as part of...
February 20, 2006 at 4:54 am
Viewing 15 posts - 586 through 600 (of 683 total)