Viewing 15 posts - 1,846 through 1,860 (of 3,011 total)
Didn't you leave out a few numbers?
declare @date datetime
set @date = getdate()
select
convert(varchar(35),@date,a.Code) AS FormattedDate,
Code = convert(varchar(3),a.Code),
convert(varchar(40),'select convert(varchar(35),@date,'+convert(varchar(20),a.Code)+')') as [SQL]
from
(
select Code = 0 union all
select Code = 1 union all
select Code...
April 8, 2009 at 5:17 pm
This will do what you want:
declare @a nvarchar(max)
select
@a = isnull(@a+N' union all ',N'')+
'
select [Database] = convert(sysname,'''+a.name+
'''), [Table] = a.name collate SQL_Latin1_General_CP1_CI_AS from '+
quotename(a.name)+'.sys.tables...
April 7, 2009 at 10:34 pm
Bob Hovious (4/7/2009)
April 7, 2009 at 10:03 pm
Any backup strategy that does not include getting your database backups to tape is incomplete and a disaster waiting to happen.
It doesn't have to be database corruption. It could...
April 7, 2009 at 6:14 pm
drodriguez (4/7/2009)
Thanks! This is what I came up with.Let me know what you think.
WHERE dtStartTimeStamp >= CONVERT(varchar(10),DATEADD(day,-1, GETDATE()),20) + ' 00:00:00.000' AND dtStartTimeStamp <= CONVERT(varchar(10),DATEADD(day,-1, GETDATE()),20) + ' 23:59:59.000'
I...
April 7, 2009 at 5:59 pm
Sudiendra (4/7/2009)
Michael Valentine Jones (4/7/2009)
We have San replication, so we switched off tape backups..
Thanks,
Sudhie.
That is an extermely bad idea. If your database becomes corrupt, you will have nothing to...
April 7, 2009 at 5:51 pm
Yes, you will need to restore the transaction log backups created after your last full backup up until the point of time you want to recover to.
It is no different...
April 7, 2009 at 5:45 pm
This is a better way to code date range queries:
WHERE
-- Greater than or equal to 00:00:00.000 yesterday
dtStartTimeStamp >= '2009-04-06 00:00:00.000' AND
-- Before 00:00:00.000 today
dtStartTimeStamp < '2009-04-07 00:00:00.000'
--Using getdate() to...
April 7, 2009 at 5:39 pm
Sudiendra (4/7/2009)
Differential Backup - Every day and Retention Period - 1 day (Until the next Diff backup)
Full Backup -...
April 7, 2009 at 5:29 pm
GilaMonster (4/7/2009)
Similar thing here. In my country, woman and IT don't usually go in the same sentence. The number of times I've been 'mistaken' for the project manager, the token...
April 7, 2009 at 5:22 pm
RBarryYoung (4/4/2009)
Why would our helping you to get a job that you are apparently unqualified for be a good thing?
That wasn't harsh.
My first reply on this thread below wasn't harsh...
April 7, 2009 at 12:14 pm
I have always found the DATEADD/DATEDIFF method to be the fastest when I tested it.
I would avoid using FLOOR method for the simple reason that it is an unsupported method...
April 7, 2009 at 11:50 am
You cannot reset the timestamp generation.
What you are describing is bug that needs to be fixed. There was never any reason to assume that a timestamp column can be...
April 6, 2009 at 5:43 pm
YSLGuru (4/6/2009)
Jason Miller (4/6/2009)
GSquared (4/3/2009)
For example, why doesn't this work:
select Col1, count(*)
from dbo.MyTable;
And the follow-up where,
select Col1, Col2, count(*)
from dbo.MyTable
GROUP BY Col1, Col2;
select Col1, Col2, count(*)
from dbo.MyTable
GROUP BY Col2, Col1;
Are...
April 6, 2009 at 2:33 pm
Yes, you can place the files anywhere you want.
April 3, 2009 at 9:50 pm
Viewing 15 posts - 1,846 through 1,860 (of 3,011 total)