Viewing 15 posts - 3,736 through 3,750 (of 7,614 total)
September 26, 2017 at 3:15 pm
I think you've got the computed column backwards here.
That is, since the data is supposed to be in 1NF, the "divided by 10" value should be in a...
September 26, 2017 at 2:28 pm
Some refinement is possible. For example, for any single column that has a unique index on it, you wouldn't need to count the values, instead simply get the number of...
September 25, 2017 at 2:54 pm
One of the main reasons to not give VIEW DEFINITION to users is so that they can't see the underlying physical table names. If you let them know the physical...
September 25, 2017 at 10:15 am
I'd say you get a slight gain by disabling the non-clus indexes first. That's because disabling the index requires removing the rows, which requires some minor logging (of page deallocations,...
September 25, 2017 at 9:47 am
September 25, 2017 at 8:14 am
Or just:
SELECT LEFT(OrigDateString, 4) + ' Q' + CAST((CAST(SUBSTRING(OrigDateString, 6, 2) AS tinyint) + 2) / 3 AS varchar(1))
FROM #TestData
September 22, 2017 at 1:25 pm
Columns lengths have another effect on memory allocation as well. SQL reserves memory prior to processing a table. It determines the amount of memory to reserve partly based on column...
September 22, 2017 at 9:02 am
September 21, 2017 at 10:19 am
September 21, 2017 at 8:16 am
Or:
select *
from lineitems
where orderid in (select orderid from orders where customerid = @CustomerID)
September 21, 2017 at 8:12 am
I think it's very possible that o.type = 'U' would speed it up, rather than using OBJECTPROPERTY.
September 21, 2017 at 8:10 am
Move the error details to a different table. That table could be keyed by the clustering key of this table plus perhaps a sequential error number.
This table should...
September 21, 2017 at 8:04 am
There's a fundamental difference between those queries.
The first is an INNER join to dept, obviously, as explicitly stated, whereas the second is a LEFT OUTER JOIN, although only implicitly.
September 19, 2017 at 9:26 am
Viewing 15 posts - 3,736 through 3,750 (of 7,614 total)