Are you sure this works? What if there is a column called "GRASS", then it would be split into "GR" as column name and "S" as alias. This would break the query IMO and seems to be pretty unsafe.