If you are on CF7, then you can use Cast() in the query of queries to convert a column to a specific type. For example,
<cfquery> SELECT Cast(StringColumn as Integer) as NumberColumn FROM MyQuery </cfquery> You might not be able to due the order by in the same statement. You might need an additional query of queries to accomplish that. For more info, see http://livedocs.macromedia.com/ coldfusion/7/htmldocs/00001271.htm Jon On 7/13/05, Lincoln Milner <[EMAIL PROTECTED]> wrote: > I've got a QofQ that I want to order on a character field. Only the > field contains only numbers (don't ask), and the user wants it sorted as > if they were numbers (1, 2, 3, ...) not strings (1, 10, 11, 2, 3, ...). > Simple enough in database (Oracle in this case) since you can just > TO_NUMBER() the value, but you apparently don't have that luxury in QofQ > (it doesn't like parentheses in the SQL statements. > > So anyone have any ideas on how I can do this? I'm running out of > options and "no can do" isn't sitting well with the user. > > Thanks! > > Lincoln T. Milner > Senior Applications Programmer/Analyst, Department of Health Evaluation > Sciences > > > Penn State College of Medicine Ph: 717.531.7178 x4521 > 600 Centerview Drive Fax: 717.531.5779 > Suite 2200, MC A210 [EMAIL PROTECTED] > Hershey, PA 17033-0855 > > *****E-Mail Confidentiality Notice***** > This message (including any attachments) contains information intended > for a specific individual(s) and purpose that may be privileged, > confidential or otherwise protected from disclosure pursuant to > applicable law. Any inappropriate use, distribution or copying of the > message is strictly prohibited and may subject you to criminal or civil > penalty. If you have received this transmission in error, please reply > to the sender indicating this error and delete the transmission from > your system immediately. > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211796 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

