Viewing 15 posts - 556 through 570 (of 3,011 total)
To convert an integer year number to the last day of the year, you can use DATEADD without the need to convert to a character string:
-- Convert year number to...
July 4, 2012 at 12:05 pm
If you are using SQL Server 2008 R2 Enterprise Edition you can encrypt the whole database with transparent data encryption (TDE), and no changes at all are required to your...
July 4, 2012 at 11:22 am
Here is an example for the current year:
select LastDayOfYear = dateadd(yy,datediff(yy,-1,getdate()),-1)
Results:
LastDayOfYear
-----------------------
2012-12-31 00:00:00.000
(1 row(s) affected)
For a different year, just replace getdate() with a date in that year.
July 2, 2012 at 6:48 pm
Since you are running Enterprise Edition, you should be able to drop the clustered index and create the new primary key clustered index using the ONLINE = ON option, if...
July 2, 2012 at 6:08 pm
I don't give much credibility to anything I read on the InfoWorld site, even when they're quoting another source.
They're just cheerleaders for the latest IT fads, and shills for their...
June 30, 2012 at 2:34 pm
GP Van Eron (6/29/2012)
Had interesting task today, to seach sps / views in a db for any containing '*' character.
So far I have tried the following...
June 29, 2012 at 3:31 pm
It might help if you posted your actual query formatted is a way that people can read.
SELECT
MAX(EC.eecDateOfTermination)
FROM
EMPCOMP EC
WHERE
-- no table with an alias of E in this query
EC.EecEEID = E.EECEEID...
June 28, 2012 at 7:48 am
Are you sure this will really be a problem? Have you noticed any performance problems? How many rows will the table contain?
Is the fragmentation really on the clustered...
June 28, 2012 at 12:21 am
ScottPletcher (6/27/2012)
Eugene Elutin (6/27/2012)
Mike John (6/27/2012)
Once committed it is committed....
Not for nested transactions, check this one:
begin transaction outerOne
update Table1 set Col1 = 'booo' where id =1...
June 27, 2012 at 4:44 pm
nic79 (6/27/2012)
June 27, 2012 at 4:32 pm
Jeff Moden (6/26/2012)
nic79 (6/26/2012)
June 26, 2012 at 7:59 pm
D. Clark (6/26/2012)
Lynn Pettis (6/26/2012)
Maintenabce plans are good for small databases or when you find yourself an Accidental DBA having to get something into place. I used them when...
June 26, 2012 at 3:53 pm
The data was probably there, but the query output in Management Studio can show a maximum of 8192 characters per line, and defaults to much less.
You can verify that the...
June 26, 2012 at 3:48 pm
How do you know it is being truncated?
June 26, 2012 at 11:01 am
Viewing 15 posts - 556 through 570 (of 3,011 total)