select col1,'|', col2 from table order by col1, col2; ?