TheBugSlayer
Programmer
All,
I have two connection strings for two different customer Pervasive DBs. The query containing the CASE statement below works on the first DB and fails on the second DB, working on it only if I remove the statement. My version of Pervasive is 8. At this time I suspect the latter DB may be in a version that did not support the CASE statement? What PSQL statement returns the database version like SQL Server's SELECT @@VERSION?
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)
I have two connection strings for two different customer Pervasive DBs. The query containing the CASE statement below works on the first DB and fails on the second DB, working on it only if I remove the statement. My version of Pervasive is 8. At this time I suspect the latter DB may be in a version that did not support the CASE statement? What PSQL statement returns the database version like SQL Server's SELECT @@VERSION?
Code:
SELECT CASE DeptCode
WHEN 'A' THEN '*'
WHEN 'AB' THEN '*'
WHEN 'AS' THEN '*'
WHEN 'BS' THEN '*'
WHEN 'C' THEN '*'
WHEN 'D' THEN '*'
WHEN 'E' THEN '*'
WHEN 'F' THEN '*'
WHEN 'FD' THEN '*'
WHEN 'G' THEN '*'
WHEN 'GM' THEN '*'
WHEN 'I' THEN '*'
WHEN 'JS' THEN '*'
WHEN 'K' THEN '*'
WHEN 'L' THEN '*'
WHEN 'M' THEN '*'
WHEN 'MK' THEN '*'
WHEN 'N' THEN '*'
WHEN 'P' THEN '*'
WHEN 'PS' THEN '*'
WHEN 'R' THEN '*'
WHEN 'RK' THEN '*'
WHEN 'S' THEN '*'
WHEN 'SD' THEN '*'
WHEN 'SL' THEN '*'
WHEN 'T' THEN '*'
WHEN 'V' THEN '*'
WHEN 'W' THEN '*'
WHEN 'Z' THEN '*'
ELSE DeptCode
END AS Code...
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)