Narasiman nar

Narasiman nar

  • NA
  • 64
  • 21.6k

Error in my sql server query

May 22 2018 6:27 AM
  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.
 

Answers (3)