I am trying to turn certain fields of a Gridview control invisible based on the the values from a certain data field within my database.
In order to do so I require a bool value, however the value indicating if it should be visible or not is an integer.
I was trying to convert the value, within my sql statement, as I do not have direct access to the database in order to
insert the value I need.
The field "MyValue" will return a value between 0 and 5. If it is 0 it should return "False" if anything else it should be "True"/
This is my sql statement:
CODE
SELECT name, city, mallName, companyName, contactName, projectID, substantialcompletiondate, worktype, IF(MyValue>0, "TRUE", "FALSE") FROM dbo.qryProjectsListForWebsite WHERE (province = @province) ORDER BY name
I get an except from this, due to the if(,) branching.
Any help would be appreciated.