473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

the value cannot be converted to a number

what can be the problem? Since i tried to write this values like:

Expand|Select|Wrap|Line Numbers
  1. <cfset totResponse = #GETTOTSCORE1.a# + #GETTOTSCORE2.b# + #GETTOTSCORE3.c#>
  2. <cfset avg = #GetSum1.score1# + #GetSum2.score2# + #GetSum3.score3#>
  3. <cfset totAVG = avg / #totResponse#>
first calculation to calculate total response and I got error in value #GETTOTSCORE3.c#
In my oracle the value for #GETTOTSCORE3.c# is 0 and at the website also display 0 in table

but when I do a calculation for totResponse, it get error for this
Expand|Select|Wrap|Line Numbers
  1. <---<cfset totResponse = #GETTOTSCORE1.a# + #GETTOTSCORE2.b# + #GETTOTSCORE3.c#>--->
  2.  
I think the value for #GETTOTSCORE3.c#> need to converted into 0.
How can I fix this?
tq.. :)
Feb 20 '13 #1

✓ answered by acoder

Just put it around your variables - see docs.

PS. please use [code] tags around your code.

4 10826
acoder
16,027 Expert Mod 8TB
Use the val() function.

If that doesn't work, please post your query for GETTOTSCORE3.
Feb 20 '13 #2
i'm sorry, how to use function val() ? can you give an example? I'm really new in coldfusion
and here the query for GETTOTSCORE3.

Expand|Select|Wrap|Line Numbers
  1. <cfquery name="GETTOTSCORE3" datasource="#ds#">
  2.         select count(s.quest_score) as c
  3.         from survey_customer_score s, survey_customer_header h
  4.         where s.quest_score = 3
  5.         and s.survey_id = 1757        
  6.         and s.quest_id = 1759        
  7.         and s.cust_id = h.cust_id
  8.     </cfquery>
this query is to count score3.
value score for score3 is 0 in oracle but in coldfusion it can't define the value score3 as 0.
But now I want to know how to convert score3 into 0 in coldfusion by using function val()

tq :)
Feb 21 '13 #3
acoder
16,027 Expert Mod 8TB
Just put it around your variables - see docs.

PS. please use [code] tags around your code.
Feb 21 '13 #4
tq for helping me :)
Feb 21 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jeff Thies | last post by:
I'm trying to test if a value is a number. I thought I could do this: var test='not_a_number'; var test2='4.00'; num_test=parseFloat(test); if(num_test == 'NaN'){alert('that was not a...
2
by: Chris Herring | last post by:
Hi there: Well, let me start off by saying that I am a Visual Studio drag and drop weenie, not a real programmer. So I tend to get confused when things do not look like the instructions said they...
1
by: Jim | last post by:
I am experiancing a problem filling a dataset. I am getting a Value cannot be null exception and can't figure out why. Here is the code what the heck could be going on? Dim conn As New...
2
by: Stephan Walter | last post by:
Hi, I'm hacking on a LISP interpreter in JS , and running into trouble with numbers and Number objects. This is what I have: var a = new Number(1); var b = a; document.writeln(a == b); ...
1
by: David C. allen | last post by:
I have created a simple Client-side SOAP Extension for a webclass that I have. When I apply the extension attribute to the the calling function in the proxy class I get an error 'Value cannot be...
1
by: Sanjay Godbole | last post by:
Hi, I am getting following error while executing the axpx page. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for...
3
by: Paul | last post by:
Hi, I'm new to .NET and I'm trying to run through the tutorial "Creating a Web Application Using VB" As I follow the directions, It seems to work just fine. I can preview the data from the...
2
by: paul.dunstone | last post by:
HI all I am using msbuild to compile my web application project. After building the solution I get the following error message: Server Error in '/Community' Application....
0
by: pankajprakash | last post by:
Hi all I am using the Ajax control toolkit and want to the fill the gridview but at the time of rendering it occurs the error "Sys.ArgumentNullException: Value cannot be null. Parameter name:...
1
by: kwokv616 | last post by:
I'm currently working on a project to convert a Foxpro database into Access. How do I lookup a cell value (given row number and column number) and return it to a variable? This is what I want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.