Viewing 15 posts - 1,276 through 1,290 (of 1,464 total)
Although STRING_SPLIT is a native function to SQL 2016, it is not very efficient.
You will get better performance if you use the following SQL STRING SPLITTER
January 24, 2017 at 10:24 pm
January 23, 2017 at 4:27 am
January 23, 2017 at 12:43 am
I would start by finding all of the objects that reference the lookup table.
SELECT
SchemaName = OBJECT_SCHEMA_NAME(sm.object_id)
, ObjectName = OBJECT_NAME(sm.object_id)
FROM sys.sql_modules...
January 19, 2017 at 10:56 am
All the outputs of your case statement need to have the same (or implicitly convertable) data type.
Also, your case statement needs to be terminated with and end
January 18, 2017 at 11:20 am
January 16, 2017 at 3:14 am
January 16, 2017 at 3:11 am
I have a set of relatively big tables with very high reads and writes occurring...
January 16, 2017 at 2:51 am
DECLARE @String VARCHAR(50) = '#BAVDB#(RowCount=3204)';
-- As a single statement
SELECT NumVal = SUBSTRING(@String, CHARINDEX('=', @String) +1, CHARINDEX(')', @String, CHARINDEX('=', @String) +1) - CHARINDEX('=', @String) -1);
--...
January 13, 2017 at 3:44 am
January 13, 2017 at 3:31 am
You can try this
select TOP 1 count(*) as [number of occurences]
from (
select case
when answer_count between 0 and 5 then '...
January 13, 2017 at 3:26 am
Formatted SQL code that is wider than the display box does not wrap. There are scroll bars, but they only seem to work if you highlight text and keep going....
January 12, 2017 at 10:55 pm
I am really not liking the new interface.
There is waaaay too much white space. Makes everything look clunky.
January 12, 2017 at 5:15 am
WITH cteSports AS (
SELECT * ,sn = ROW_NUMBER() OVER (PARTITION BY name ORDER BY sport)
FROM #example
)
SELECT
cte.name
, cte.city
, cte.entryDate
, sport1 = MAX(CASE WHEN cte.sn =...
January 6, 2017 at 10:30 pm
Viewing 15 posts - 1,276 through 1,290 (of 1,464 total)