Your select statement will always return 1 row, and it will either contain the 
max number, or ""

So, use:

<cfquery name="qryHighestNum" datasource="ocreodsn">
  Select Max(ReqNum) as HighestNumber
  from PrintingReq
</cfquery>
<cfset NextReqNumber = val(qryHighestNum.HighestNumber) + 1>

No need for a cfif, since val("") returns 0

--
Pat

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268232
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to