No quotes around salePrice:
    #Replace(salePrice, ",", "", "ALL")#

(But why isn't numberFormat working for you )

----- Original Message -----
From: "Metzy Martinez" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, May 10, 2001 2:32 PM
Subject: RE: insert problem


> I tried doing a replace but i still get the same output
> I'm doing this before i save.
>
> my field type is money.
> there are no quotes on my field
>
>
> <cfquery name="prodEdit" datasource="#dsn.bps#" dbtype="ODBC">
> Update product
> Set sectionID = #sectionID#,
> productName = '#productName#',
> description = '#description#',
> manufacturer = '#manufacturer#',
> manufURL = '#manufURL#',
> <cfif changeLarge is "Yes">
> imageName = '#imageName#',
> </cfif>
> <cfif changeThumb is "Yes">
> thumbName = '#thumbName#',
> </cfif>
> <cfif changePrint is "Yes">
> printName = '#printName#',
> </cfif>
> price = #price#,
> salePrice = #salePrice#
> Where productID = #productID#
> </cfquery>
>
>
> #Replace("price", ",", "", "ALL")#
> #price#
>
> #Replace("salePrice", ",", "", "ALL")#
> #salePrice#
>
>
> price $45.50 salePrice $111,110.00
>
>
>
>
>
>
> --------------------------------------------------------------------------
--
> ----
>
> Error Occurred While Processing Request
> Error Diagnostic Information
> ODBC Error Code = 37000 (Syntax error or access violation)
>
>
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 9: Incorrect syntax
near
> '110.00'.
>
>
>
> The error occurred while processing an element with a general identifier
of
> (CFQUERY), occupying document position (377:2) to (377:63).
>
>
> Date/Time: 05/10/01 11:20:05
>
>
> ..
>
> -----Original Message-----
> From: Dylan Bromby [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 10, 2001 7:29 AM
> To: CF-Talk
> Subject: RE: insert problem
>
>
> Replace("1,110.00", ",", "", "ALL")
>
> or Replace(thevar, ",", "", "ALL") if it's in a variable.
>
> -----Original Message-----
> From: Metzy Martinez [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 10, 2001 10:23 AM
> To: CF-Talk
> Subject: insert problem
>
>
> i'm trying to same a number that has been formatted as dollar amount
>
> if i have an amount that is $1,110.00  it's telling that i have an error
> i'm pretty sure that it is because i'm trying to save and the number is
> being placed with a comma in it.  how can i work around this.
>
>
> Error Diagnostic Information
> ODBC Error Code = 37000 (Syntax error or access violation)
>
>
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 9: Incorrect syntax
near
> '110.00'.
>
>
>
> The error occurred while processing an element with a general identifier
of
> (CFQUERY), occupying document position (367:2) to (367:63).
>
>
> Date/Time: 05/10/01 10:08:17
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to