Thanks for all of your help.  To help out a little more, here're my queries:

<cfif #NullID.name# eq "">
<cfquery name="insertData"
         datasource="source"
         dbtype="ODBC">
   INSERT INTO tblTable (name, var1) VALUES ('#userName.name#', '#val ("0" & form.var1)#')
  </cfquery>
</cfif>

<cfif #NullID.name# IS #userName.name#>
<cfquery name="updateData"
         datasource="source"
         dbtype="ODBC">UPDATE tblTable SET var1=#val ("0" & form.var1)# WHERE name = '#userName.name#'</cfquery>
</cfif>

--S
  ----- Original Message -----
  From: Claude Schneegans
  To: CF-Talk
  Sent: Friday, September 26, 2003 12:38 PM
  Subject: Re: convert string of numbers to numeric?


  >>can you send the whole bit of code?

  Well, i don't where is the rest of the code, I just answered the problem "The value """" cannot be converted to a number."
  Adding "0" at the begining of the string will assure that the string is always transformable to a number through the val() function.

  Then if you are in a query,
  UPDATE myTable
  SET whatever = #val ("0" & form.var1)#



[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to