Variables selection results in no output

I’m using Grafana 3.8.5.

I have added a Variable called “Line” the data it retrieves from an SQL table is a number.

image

The variable selection is presented correctly in the top of the dashboard
But when I select “ALL” or more than two line numbers the results go blank with a message in the upper left corner of the Graph or table panel mssql: Incorrect syntax near ‘,’.

image
image

Who can help me to fix this?