If you are right - you could also do a QofQ to select all the cols and
use cast there. So basically a select a,b,c with no filter at all.
On 8/17/07, Brian Kotek <[EMAIL PROTECTED]> wrote:
> Write a function that returns the data in the same format the
> QueryConvertForGrid does, but keeps your leading zeros. I'd speculate that
> internally the function is doing a Query of Queries which may be treating
> these values as numbers and thus removing the leading zeros.
>
> On 8/17/07, Chris Martin <[EMAIL PROTECTED]> wrote:
> >
> > HELP PLEASE!
> >
> > The function below is supposed to return invoice information...it does
> > that to a point. If the purchase order number (which can be
> > alpha-numeric) has a leading zero, it will strip it out when it returns
> > the values to the grid. Anyone have a suggestion that could resolve
> > this problem?
> >
> > <cffunction name="getInvoices" access="remote" returntype="struct">
> > <cfargument name="customerid" type="any" required="false" default="">
> > <cfargument name="invoiceType" type="any" required="yes">
> > <cfargument name="page" type="numeric" required="yes">
> > <cfargument name="pageSize" type="numeric" required="yes">
> > <cfargument name="gridsortcolumn" type="string" required="no"
> > default="">
> > <cfargument name="gridsortdir" type="string" required="no" default="">
> >
> > <cfset var invoices="">
> >
> > <cfquery datasource="gi_Test" name="invoices">
> > SELECT invoice, date_format(invDate, '%m/%d/%Y') AS invDate,
> > description, orderby, customer, PO, design, CONCAT("$",CAST(total AS
> > DECIMAL(5,2))) AS theTotal, CONCAT("$", CAST(Balance AS
> > decimal(5,2))) AS theBlance, CONCAT("$", CAST(paid AS decimal(5,2))) AS
> > thePaid
> > FROM invoices070809
> > WHERE customer = '#ARGUMENTS.customerID#'
> > <cfif #arguments.invoiceType# IS NOT "All">
> > AND balance <cfif #arguments.invoiceType# EQ "Open"> <> <cfelseif
> > #arguments.invoiceType# EQ "Paid"> = </cfif>'0.00'
> > </cfif>
> > <cfif ARGUMENTS.gridsortcolumn NEQ "" AND ARGUMENTS.gridsortdir NEQ "">
> > ORDER BY #ARGUMENTS.gridsortcolumn# #ARGUMENTS.gridsortdir#
> > </cfif>
> > </cfquery>
> >
> > <cfreturn QueryConvertForGrid(invoices, arguments.page,
> > arguments.pageSize)>
> > </cffunction>
> >
> > --
> > Chris Martin
> > -------------------------------------------
> > Gandy Ink Information Technology Department
> > [EMAIL PROTECTED] (325) 949-7864 X-364
> > -------------------------------------------
> > www.gandyink.com
> >
> >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286523
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4