I have a column called location and it has data in it like:
texas_dallas
florida_miami
I am trying to create a SQL statement that will get rid of the _ and reverse the order so that I get:
dallas texas
miami florida
So far I have this statement which seems to get rid of the underscore and gives me only the entry before the _.
SELECT SUBSTR(location, 1 , INSTR(location, ‘_’)-1 ) AS output from general;
I am having some trouble figuring out the rest of what I need to do.
EDIT Corrected order of output.