Using a table instead of a variable:
SELECT count(priceLineLists.RoomTypeId)
FROM Mytable
CROSS APPLY OPENJSON (JsonDataCol, N'$.BasePriceLineList')
WITH (
RoomTypeId int)
AS priceLineLists
Using a table instead of a variable:
SELECT count(priceLineLists.RoomTypeId)
FROM Mytable
CROSS APPLY OPENJSON (JsonDataCol, N'$.BasePriceLineList')
WITH (
RoomTypeId int)
AS priceLineLists