Viewing 15 posts - 4,411 through 4,425 (of 7,597 total)
Hugo Kornelis (2/16/2016)
ScottPletcher (2/16/2016)
Get rid of the dashes (-) in the date, they introduce errors (ambiguity).Use format 'YYYYMMDD [hh:mm:ss]', which is always interpreted correctly, regardless of language/date settings.
Sorry, but that...
February 16, 2016 at 1:26 pm
Sounds like a good way to get yet more of the dreaded:
String or binary data would be truncated.
error. MS, seriously, you can't tell us which column had the error??...
February 16, 2016 at 1:18 pm
These are unlikely, but let's:
1) add brackets around the db name, just in case.
2) specify a 'dbo' schema for the table name, just in case. It's easy to accidentally...
February 16, 2016 at 1:13 pm
Get rid of the dashes (-) in the date, they introduce errors (ambiguity).
Use format 'YYYYMMDD [hh:mm:ss]', which is always interpreted correctly, regardless of language/date settings.
declare @CLUSTER_CODE as nvarchar(3)
declare@START_MONTH as nvarchar(2)
declare@START_YEAR...
February 16, 2016 at 12:58 pm
For statistics, I'd do what DTA said. For indexes, definitely not, all DTA index recommendations should be thoroughly reviewed before creating/implementing. But for stats, if SQL "says" it...
February 16, 2016 at 12:48 pm
Sorry, don't have much time but here's a quick overview of one method to consider:
1) create another table with the new bigint data type to copy the existing data to...
February 12, 2016 at 1:24 pm
I would think sys.sql_expression_dependencies would contain those references, since a table-type is in sys.objects, type = 'tt'.
February 12, 2016 at 12:58 pm
ALTER TRIGGER [dbo].[BadUpdate]
ON [dbo].[SomeTable]
INSTEAD OF UPDATE
AS
SET NOCOUNT ON
IF EXISTS (
SELECT 1
FROM dbo.Foo
...
February 11, 2016 at 2:28 pm
Rather than being "stuck" on tuning, why not take this as an opportunity to possibly tune the query overall and post the code? Perhaps it can be reduced below...
February 10, 2016 at 9:42 am
If you create a new column, and copy existing data to that column, you don't have to UPDATE every row in a single transaction. And you don't have to...
February 10, 2016 at 7:43 am
So the entire 460GB is in the main part of the table, none in overflow space? Often with a row that wide you'd be able to offload a decent...
February 9, 2016 at 3:38 pm
Yeah, should be good, except that I'd use varchar instead of char so that you don't have trailing spaces after the /s are replaced.
February 9, 2016 at 3:30 pm
Sergiy (2/9/2016)
ScottPletcher (2/9/2016)
February 9, 2016 at 2:23 pm
That sounds like Oracle not SQL Server. SS doesn't have CTAS syntax.
February 9, 2016 at 12:32 pm
Maybe code below, if you're looking for a date:
SELECT CASE WHEN PATINDEX('%[_]20[0-9][0-9][0-1][0-9][0-3][0-9][_]%', string) = 0
THEN ''
...
February 9, 2016 at 12:31 pm
Viewing 15 posts - 4,411 through 4,425 (of 7,597 total)