Viewing 15 posts - 61 through 75 (of 173 total)
Does your table have a primary key (or unique key)? If so:-
CREATE TRIGGER [UpdateData] ON dbo.TEST
FOR INSERT, UPDATE, DELETE
AS
update T set T.timelog = Getdate()
from TEST T inner join...
.
December 17, 2002 at 8:35 am
I think this will do it, not sure if there is a simpler way: -
select
convert(varchar(2),sum (datepart(hh,Estimate_Hours)) + (sum(datepart(mi,Estimate_Hours)) + sum(datepart(ss,Estimate_Hours)) / 60) / 60)
+':'
+convert(varchar(2),(sum(datepart(mi,Estimate_Hours)) + sum(datepart(ss,Estimate_Hours)) / 60) %...
.
December 17, 2002 at 3:44 am
Do you want to just sum the hours or the whole time value?
To just sum the hours: -
select sum(datepart(hh,Estimate_Hours)) from Table
I think you want to sum the whole time...
.
December 17, 2002 at 3:13 am
Correct, the primary key is an index.
Regards,
Andy Jones
.
December 16, 2002 at 9:03 am
I think it just put 10 stars in the password textbox regardless of the password. Does the connection in the package actually connect with the new password?
Regards,
Andy Jones
.
December 16, 2002 at 9:02 am
I think with no count off it tries to return an extra recordset which contains the number of rows affected (like the output in Query analyser). You can either reference...
.
December 13, 2002 at 8:28 am
Could you move the logic in the translation stored procedure to a user defined function?
Regards,
Andy Jones
.
December 13, 2002 at 8:12 am
What do the following queries return?
select *
from regattendee ra
where
ra.showno='0184'
and ra.badgestatus='N'
and ra.contactid='MG00240158'
select *
from regcompany rc
where
rc.companyclass='BUYER'
and rtrim(rc.country)='UNITED STATES'
Regards,
Andy Jones
.
December 13, 2002 at 8:09 am
Yeah, I tried this and got the same. Interestingly if you do not return a table data type it works i.e.
CREATE FUNCTION UDFTest (@MonthToRun datetime)
RETURNS datetime AS
begin
return @MonthToRun...
.
December 13, 2002 at 7:44 am
Hi, you will need to do this in a set based operation i.e. without the variables - as a start (un-tested): -
update t
set
t.address1 = case right(t.address1,1) when ','...
.
December 13, 2002 at 7:19 am
Hi, Somthing like: -
update t
set t.c1 = ..
,t.c2 = ...
from
Table t inner join inserted i on t.pk = i.pk
Regards,
Andy Jones
.
December 13, 2002 at 6:48 am
There are some articles already on this (use search on the toolbar), one I found is: -
http://www.sqlservercentral.com/columnists/rsharma/copydatabase.asp
Regards,
Andy Jones
.
December 12, 2002 at 9:11 am
Yes! I think someone else could give you a more definitive answer, but it seems certain errors just stop processing, dependent on the error severity. There is no generic error...
.
December 12, 2002 at 4:34 am
Hi, I ran another test here is how I set up the test data: -
create table T1 (c1 int)
go
create table T2 (c1 int)
go
create table T3 (c1 int)
go
create table T4 (c1...
.
December 6, 2002 at 7:48 am
In answer to the original question: -
'Also, in EM, when I right-click properties a table, it tells me the number of records in the table. Does anyone know how this...
.
December 6, 2002 at 3:58 am
Viewing 15 posts - 61 through 75 (of 173 total)