I am new to PostgreSQL and trying the below two scenarios:
- Select a column name which already has a forward slash(/) in database (Road/Highway)
- Using
case
on same column along withindex
Select Road/Highway,
case
when index(upcase(Road/Highway), 'xturn') > 0 then 2
else 0
end as preferred_road
from abc_data;
But I am getting syntax error near index and for slash it is only taking Road.