Viewing 15 posts - 1 through 15 (of 38 total)
Something like this ...
select datediff(minute,convert(datetime,'09:00:00'),convert(datetime,convert(char(8),getdate(),8)))
December 13, 2004 at 2:22 pm
A possibility (gotta go in a few minutes!)
Calculating time diff A->B using 0800-1600 only.
Create a temporary table containing the following recordsA to 16:0008:00 to 16:00 for each day in between08:00...November 10, 2004 at 9:11 pm
Rather late! But here's another way of doing it ..
declare @tab1 table (letter char(1)) declare @tab2 table (letter char(1)) declare @tab3 table (letter char(1)) insert into @tab1 values ('A') insert into @tab1 values ('B') insert...
October 6, 2004 at 5:45 pm
And ... as I've just remembered, there's another way which is much more friendly. Edit the SQL Server Agent job. Edit the job step. Under "Advanced" there's the option to send the...
August 23, 2004 at 5:15 pm
Another possibility is to use Data Transformation Services (DTS), which is part of SQL Server Enterprise Manager. Theses jobs can be scheduled from within DTS.
Michael
August 23, 2004 at 4:02 pm
A possible approach would be to read the data from each of the tables into one temporary table which has the name (or alias) of the source table as a...
August 22, 2004 at 7:46 pm
To avoid any ambiguity, I always try to enter the month as 3 letters, and show it in the same form on reports (some of which are sent to other...
June 14, 2004 at 1:51 am
1st question ... select * from INFORMATION_SCHEMA.TABLES
Michael
May 26, 2004 at 3:54 pm
A bit late sending in a reply (been on holiday!)
My approach to calculating working days is a bit simpler. Holiday is a table containing the dates of all holidays.
datediff(dd,convert(char(11),start_date),@end_date) -...
March 23, 2004 at 7:57 pm
My memory must be somewhat hazy! I managed to relocate the article - thanks to the computer having a better memory than me.
http://support.microsoft.com/default.aspx?scid=kb;en-us;294350
The bit about the upgrade is a...
March 5, 2004 at 6:46 pm
That's fine if you've got INFORMATION_SCHEMA.
If you have upgraded your database in situ instead of starting from scratch you won't have it, and can't install those tables. (Can't find the reference...
March 5, 2004 at 1:20 am
This syntax ought to work (haven't tested it!)
sum(CASE when dated >= '1-nov-1999' and dated < '1-nov-2000' then val else null END) as y1999,
March 4, 2004 at 2:34 am
select o.name, c.name from sysobjects o inner join syscolumns c on c.id = o.id where o.xtype = 'U' and c.xusertype = 61
March 4, 2004 at 2:17 am
This will work ... can probably be simplified
declare @temp table ( FEmpID int, FTime datetime, FType char(3) ) insert into @temp values ( 210, '2004-03-03 08:59:00.000', 'IN' ) insert into @temp values ( 210, '2004-03-03 19:10:00.000', 'OUT') insert into @temp values ( 210, ...
March 4, 2004 at 2:07 am
Amending noeld's post ... is this what you mean? I don't like 2 digit years! The coding works only for the 21st Century. It's fairly easily modified to handle a...
March 2, 2004 at 12:32 am
Viewing 15 posts - 1 through 15 (of 38 total)