Viewing 15 posts - 1,591 through 1,605 (of 3,011 total)
select x= 000031761*0.1
Results:
x
---------
3176.1
October 9, 2009 at 3:20 pm
Use BACKUP and RESTORE. You can refer to SQL Server 2005 Books Online for detailed information on how to do this, starting with the link below.
SQL Server 2005 Books...
October 9, 2009 at 3:14 pm
select
NewDate = dateadd(hour,a.TM/100,dateadd(minute,a.TM%100,a.DT))
from
( -- Test Data
select DT = convert(datetime,'2006-08-21'), TM = 1123
) a
Results:
NewDate
-------------------------
2006-08-21 11:23:00.000
(1 row(s) affected)
October 9, 2009 at 12:19 pm
delete from MyTable
where
--- All Other Selection Criteria ---
and MyTable.ForeignKeyColumn not in
( Select MyOtherTable.PrimaryKeyCol from MyOtherTable )
October 8, 2009 at 10:32 am
Gianluca Sartori (10/8/2009)
It's quite frurstrating that the only other Italian person I ever found on these forums is such a fool.
You're #1 :exclamationmark:
October 8, 2009 at 10:26 am
hefterr-972543 (10/6/2009)
Hi Michael,I'm not familiar with an
"..do an UPDATE with an OUTPUT clause"
Can you provide a simple example?
Thanks again,
hefterr
DECLARE @Ctr table( Counter int NOT NULL)
UPDATE CONTROLTBL
SET
Counter = Counter +1
OUTPUT
INSERTED.Counter
INTO
@Ctr
--...
October 6, 2009 at 6:44 pm
select
[HHHHH:MM:SS] =
right('00000'+convert(varchar(20),Seconds/3600),5)+
right(convert(varchar(20),dateadd(ss,Seconds%3600,0),108),6)
from
(
...
October 6, 2009 at 4:11 pm
A foreign key by itself does not create an index, so it is a good practice to create a matching index on all foreign keys.
October 6, 2009 at 3:55 pm
Instead of doing a SELECT and then an UPDATE, do an UPDATE with an OUTPUT clause so that everything happens in one statement.
October 6, 2009 at 3:51 pm
Robert.Smith-1001156 (10/6/2009)
October 6, 2009 at 3:46 pm
Function F_AGE_IN_YEARS in the script in the link below calculates age in years from @START_DATE through @END_DATE and returns the age as an integer.
Age Function F_AGE_IN_YEARS
October 5, 2009 at 10:38 am
There problem is that a month is not a set amount of time, so you have to define exactly what a half month and full month are?
If you are born...
October 5, 2009 at 10:35 am
IceDread (10/5/2009)
While I'd argue that there are lots of people that does not want mankind to go forward, like the Christian Church attempts to stop Scientists and control societies as...
October 5, 2009 at 9:26 am
That is exactly what I would expect in a hosting environment.
I have yet to encounter a hosting vendor that had any real knowledge about backup and recovery for SQL Server.
October 3, 2009 at 1:46 pm
In terms of incidental DBA, I would define best practices in terms of what is least likely to let them shoot themselves in the foot and most likely to have...
October 2, 2009 at 2:27 pm
Viewing 15 posts - 1,591 through 1,605 (of 3,011 total)