To expand on what I think Greg was getting at:
You could do something like:
<cfset labelCount = 30>
**Your qGetAddresses Query HERE**
<Cfset returnlabels = (30 - qGetAddresses.recordcount)>
<cfif returnlabel GTE 1>
<cfquery name="qGetFullSheet" datasource="xxxx" MAXROWS="#returnlabel#">
**Get the return addresses here**
</cfquery>
</cfif>
Something like that should work...But you said you needed it in one query -
so that may not help ???
- Nick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2
Build sales & marketing dashboard RIAâs for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2883
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15