FAST json extractor, subquery for re-use

1

Please login or register to vote for this query.

(click on this box to dismiss)

Woodworking

Q&A for professional and amateur woodworkers

--SELECT * FROM PostHistoryTypes;

--SELECT * FROM PostHistory WHERE Id=18268039

--SELECT value FROM STRING_SPLIT('a,b,c,d',',')

SELECT TOP 1000
  spl.value,
  PostHistory.Id,
  PostHistory.PostHistoryTypeId,
  PostHistory.PostId
FROM PostHistory
CROSS APPLY STRING_SPLIT(Text, ':') spl
WHERE
  PostHistory.PostHistoryTypeId BETWEEN 10 AND 13
  AND
  PostHistory.Id = 18268039
  AND
  SUBSTRING(spl.value, 1, 1) BETWEEN '1' AND '9'
ORDER BY PostHistory.Id, spl.value

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results