Viewing 15 posts - 2,701 through 2,715 (of 13,461 total)
SSMS has an option to save a query results directly to file, without displaying it(Control + Shift + F, then execute the query);
that's an option you might want to...
January 2, 2014 at 6:11 am
there are a lot of options for scripting that can be enabled/disabled;
take a look in your Tools>>Options (in 2012 SSMS, it's Tools>>Options>>SQL Server Object Explorer>>Scripting
and check your setting for "Script...
January 2, 2014 at 6:01 am
SQL Guy 1 (12/31/2013)
Here is what I run:
exec sp_rename
@objname ='schema_name.table_name.FK_old_name',
@newname ='FK_new_name',
@objtype ='Object'
I get...
December 31, 2013 at 1:28 pm
and with all those headaches for migrating SSIS maintenance plans, is there anything that the maintenance plans do that that the scripts from ola hallengren[/url] doesn't do from a TSQL...
December 31, 2013 at 8:11 am
i think both the 2008R2 and the 2012 are on the same server, right?
when you try to restore that 2008R2 backup, it's remembering where it's mdf and ldf files were...
December 31, 2013 at 7:31 am
not quite enough information; are you saying the installer fails, and never installs SQL server, or are you saying AFTER you installed, the service won't start?
if the installer successfully installed...
December 31, 2013 at 7:19 am
Rando (12/30/2013)
That's where I run into the syntax error;Msg 241, Level 16, State 1, Line 1
Syntax error converting datetime from character string.
can you do a select to find non-convertable date...
December 30, 2013 at 2:27 pm
if you explicitly convert it to datetime, your previous code would work:
WITH SampleData AS(
SELECT CAST( '2013-12-30 12:09:00.123' AS CHAR(24)) AS CounterDateTime
)
SELECT
CONVERT(VARCHAR(10),convert(datetime,CounterDateTime),101) as Date,
CONVERT(VARCHAR(5), convert(datetime,CounterDateTime), 108) + ' ' +...
December 30, 2013 at 2:14 pm
additionally, your "time column" comes out bad because you are converting a varchar(24) to a varchar(5); effectively the same as a LEFT function.
you get the '2013-' portion of the string,...
December 30, 2013 at 1:13 pm
Rando (12/30/2013)
Column:
CounterDateTime (char24), not null)
Column Example Value:
2013-12-30 12:09:00.123
Code:
SELECT
CONVERT(VARCHAR(10),CONVERT(varchar,CounterDateTime),101) as Date,
CONVERT(VARCHAR(5), CounterDateTime, 108) + ' ' + SUBSTRING(CONVERT(VARCHAR(19), CounterDateTime, 100),18,2)...
December 30, 2013 at 1:03 pm
my working code for the same functionality is largely the same;
i think you'll need to try-catch and get the inner exception and see what the server/connection issue is;
I just tried...
December 30, 2013 at 12:57 pm
you can get the date an object is created from sys.objects create_date and modify_date.(tables/procs/views etc)
you cannot get when a permission was granted. that date is not stored anywhere.
if you...
December 30, 2013 at 9:40 am
you should post the entire error, especially the error number.
i'll bet this is security related...cant find file or some error like that.
the reason: 'C:\Documents and Settings\ all folders there are...
December 30, 2013 at 6:13 am
jdixon-586320 (12/30/2013)
December 30, 2013 at 6:09 am
my version is just an adaptation of Luis's: i'm just selecting the rows form the indexes, as the count is already materialized, and is faster on huge tables.
Thank you Luis...
December 27, 2013 at 11:04 am
Viewing 15 posts - 2,701 through 2,715 (of 13,461 total)