BAQ - convert String to Integer

Hello. We use Vantage 8.03.305h in a SQL 2005 environment. We go
live on Vantage January 1, 2008.

I am trying to build a BAQ to convert a string to an integer.

In my BAQ, under display, I have a calculated value setup like this:

Field Name: ID
Expression: Integer(Vendor.VendorID)
Format: Empty
Data Type: Integer

When I switch to the Analyze and click test, I do not get any
errors. However, my ID (Calculated field) still works as a character.

My sort order is 1,10,100,2,3,300,4. Instead of 1,2,3,4,10,100,300.
I know that we could re-key our Supplier IDs with leading zeros, but
there are many suppliers. We are trying to find a way around re-
keying the data.

I am new to Progress code and BAQs. Can anyone see what I am doing