SELECT FARM.item,A.farmer_id,
A.farmer_season,A.farm_visitno
FROM dbo.tbl_farmer_farmdetails A
INNER JOIN dbo.tbl_farmerregistration B ON B.farmerctscode = A.farmer_id
CROSS APPLY [dbo].[StringSplits](A.farm_detailsdata,',') AS FARM
WHERE B.farmerseason = '2018'
When i run the above query shows error as follows
Operand data type varchar is invalid for subtract operator.
please let me know what is the mistake in my above sql query. i tried for several it shows the same error only. please help me.

Nilesh ShahRank #42 · 34.2K reputationPosted May 22, 2018, 4:12 AM EDT
Shahriar NikkhahRank #248 · 10.1K reputationPosted May 22, 2018, 5:54 PM EDT
Jayesh VaghasiyaRank #9,790 · 202 reputationPosted Jun 4, 2018, 10:06 PM EDT