I just want a quick 'style survey' on how folks key in SQL inside of CF.
Do you use a lot of white space for easy readability, or do you cram
everything onto 1 line with no aliased tables for streamlined
efficiency? For example, here is one of mine:
<cfquery name="getData" datasource="#arguments.dsn#">
SELECT
UNUNIT as TractorCode,
UNSER as Vin,
UNMAKE as Make,
UNPLAT as Plate,
UNDV## as Division,
'Company' as Type,
UNSUPR as Supervisor
FROM
UNITS
WHERE
UNOWN IN ('','WC','ITDS','ATDS')
AND UNDEL <> 'D'
AND UNDV## <> ''
UNION ALL
SELECT
UNUNIT as TractorCode,
UNSER as Vin,
UNMAKE as Make,
UNPLAT as Plate,
UNDV## as Division,
'Owner Operator' as Type,
UNSUPR as Supervisor
FROM
UNITS
WHERE
UNOWN NOT IN ('','WC','ITDS','ATDS')
AND UNTERM = 0
AND UNDEL <> 'D'
AND UNSTAT <> 'U'
AND UNDV## <> ''
ORDER BY
TractorCode ASC
</cfquery>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271166
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4