Hi All,

I am building a real-estate DB and I have stumbled over an interesting
riddle:

In this case I use the following fields in Access DB (tenants)

Property_ID             -integer (related to an ID in Properties table)
Name                    -Text,
sq_ft                   -integer
rate                    -currency
lease_start             -date,
term                    -integer (months)

At some point I want to output a partial list of tenants:

<cfquery name="gettenants" datasource="xyz">
  SELECT *
  FROM tenants
  WHERE Property_ID=#Form.ID#
 <!--- where form.id is a ID of a property I list tenants for --->
</cfquery>

Based on existing data, I want to sort those tenants so that those with
closest expiration dates are listed first.

I thought of using a structure (name, CalculatedExpirationDate), but then I
will still need to output other fields from the query, like rate and sq_ft.

Is there any other way? Can such sorting be done within <cfquery> tag?

Cyrill

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to