I want to convert a non numeric field into a number by finding the unique values, sorting them, and using the sorted row location as an integer value for that non-numeric value. The sql commands that I want to implement are
select distinct field1 as ufield from table1 into cursor temp1
select ufield, rowno() as id from temp1 into cursor temp2
select field1, id from table1, temp2 where field1 = ufield
How can I imlement this in borland c++ builder?