My current challenge involves using JSTREE to display a list of system modules. The issue arises from the fact that, according to the jsTree documentation, I need to use # in my query to create the tree structure. However, when I execute the following query, it results in an error:
The error message reads: "Conversion failed when converting the varchar value '#' to data type int." My SQL query looks like this:
select mod_id as id,
(case when (mod_principal is null or mod_principal = 0)then '#' else mod_principal end) as parent, mod_modulo as text,
mod_vista from crediguate.dbo.modulo m order by m.orden
Using # in the query works perfectly fine with MySQL as demanded by jsTree. Is there any way to list my modules using # in SQL Server?