<CFQUERY name="viewlist" dataSource="Data171"> SELECT contractinfo.* , Buildings.* , Freqtype.* , matypes.* , groups.* , servicetypes.* FROM ((((contractinfo Left Join Buildings on contractinfo.buildingcon = buildings.bid) Left Join Groups on Buildings.group1 = groups.GID) Left Join matypes on contractinfo.matype = matypes.matkey) Left join freqtype on contractinfo.freqperyear = freqtype.timesperyear) Left join servicetypes on contractinfo.servicetype = servicetypes.servicekey WHERE #Listfind(months, form.Monthselect, "/")# > 0 </CFQUERY>
The From is a bit complicated but not bad. It just joining 6 tables together. The months is inside contractinfo. >> "Element MONTHS is undefined in CONTRACTINFO" in my query. > >If you have a question about your code, you should post your code. Without >seeing it, I can't say for sure what's causing your problem. > >That said, you can't refer to a CF value derived from a query within that >same query. > >Dave Watts, CTO, Fig Leaf Software >http://www.figleaf.com/ > >Fig Leaf Software provides the highest caliber vendor-authorized >instruction at our training centers in Washington DC, Atlanta, >Chicago, Baltimore, Northern Virginia, or on-site at your location. >Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295285 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

