User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 426,640 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,576 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser: Programming Forums

Junior Developer have some doubts in CF_SQL_NUMERIC

Join Date: Oct 2006
Posts: 8
Reputation: rameshsambu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rameshsambu's Avatar
rameshsambu rameshsambu is offline Offline
Newbie Poster

Help Re: Junior Developer have some doubts in CF_SQL_NUMERIC

  #2  
Nov 3rd, 2006
Hi mayoline

Trim() will only remove the leading and trailing spaces. It wont convert string to a number.

Val() will convert those characters in the beginning of a string which can be converted to a number.

Val always returns a number. Even if the conversion fails it will return 0.

Use val() whereever you want strictly numeric values (like in calculations)

In those cases where you strictly need a non-zero number, check if the value returned by val() is 0 or not and then proceed.

-Ramesh
Reply With Quote  
All times are GMT -4. The time now is 12:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC