Hi Steve,

As per usual your suggestion solution is perfect


On Fri Jun 22 10:42 , 'Steve Onnis' <[EMAIL PROTECTED]>sent:



Select loanno,
LoanProgram,
BorrowerName,
LoanFacility,
BorRate,
InvstLoanRate,
SettlementDate,
FeeFreeRate,
OtherFeeRate,
PenaltyRate,
BorRate-InvstLoanRate as lender_margin
from trails
-- MySQL
ORDER BY lender_margin

-- MSSQL
ORDER BY CONVERT(NUMERIC, BorRate-InvstLoanRate)



MySQL lets you used aliased columns in WHERE, ORDER BY, HAVING and GROUP BY
where MSSQL doesn't let you

________________________________

From: cfaussie@googlegroups.com [cfaussie@googlegroups.com] On Behalf
Of [EMAIL PROTECTED]
Sent: Friday, 22 June 2007 12:22 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] CF Query Question



Hi,

have the following query


select loanno, LoanProgram, BorrowerName, LoanFacility, BorRate,
InvstLoanRate, SettlementDate, FeeFreeRate, OtherFeeRate, PenaltyRate,
BorRate-InvstLoanRate as lender_margin
from trails


I am wondering is there is a way that i can sort the output based on
the value of "lender_margin" given its value is created from two other
columns in the table, whilst lender_margin is not a physical column in the
table

Regards


Claude









--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to