473,396 Members | 1,938 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,396 software developers and data experts.

The trouble with Zero...

139 100+
Hi,

My CF query script isn't bringing up the same result in Access, and I think it's the way zeroes are handled that's the problem.

My Access query has three query fields - two for text and one for a number range when the number is >=0 And <=2.9

Access brings a result of 16. CF brings a result of 42!

Expand|Select|Wrap|Line Numbers
  1. <cfquery name="KWBand1S" dbtype="query">
  2.         select         ClientFK,
  3.                 ResponseLevelFK,
  4.                 PowerRating    
  5.         from         getPumps
  6.         where        ResponseLevelFK like 'Standard'
  7.                 and (PowerRating >=0
  8.                 and PowerRating <=2.9)
  9.         </cfquery>
If I change the query to
Expand|Select|Wrap|Line Numbers
  1. ResponseLevelFK like 'Standard'
  2.                 and (PowerRating >0
  3.                 and PowerRating <=2.9)
(ie change >=0 to >0.
Then it brings up 16. But I'm not sure then that is doing the same thing as my Access query...

Can anyone help?
Cheers
Neil
May 12 '09 #1
4 2487
acoder
16,027 Expert Mod 8TB
Are the rest set as NULL? Perhaps Coldfusion is treating them as 0.
May 12 '09 #2
ndeeley
139 100+
Yes, they are, tho CF seems to get the same results with >0 rather than >=0...

I'll add an IS NOT NULL appendage to my scripting and test it.

Thanks!
May 12 '09 #3
acoder
16,027 Expert Mod 8TB
Did that solve the problem?
May 13 '09 #4
ndeeley
139 100+
I haven't had time to test it yet, but I'll post what happens when I do.

(I'm in a 'jack of all trades' job that requires me to use CF intensively for about 2 weeks, then not touch it for 6 months or so, hence I forget quite a bit about it...)
May 13 '09 #5

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

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
9
by: Alexander Stippler | last post by:
Hi, I've got trouble with some well known issue. Iterator invalidation. My situation: for (it=v.begin(); it!=v.end(); ++it) { f(*it); } Under some circumstances, f may alter the container...
13
by: Kishor | last post by:
Hi Friends Please help me to write a C program to find the 5th (fifth) root of a given number. Ex:(1) Input : 32 Output : 5th root of 32 is 2 Ex:(1) Input : 243 Output : 5th root of 243 is...
8
by: Eric A. Johnson | last post by:
I am using scanf (from stdio.h) and having trouble inputting a date. I want the user to be able to input a date in the format mm/dd/yyyy. I use the following: printf ("Please enter your first...
27
by: ncf | last post by:
Hi all. In another topic, I was informed that I had to dynamically allocate memory instead of just trying to expand on a list. (I'm trying to learn C, and have a strong background in PHP and...
4
by: Nick Keighley | last post by:
Hi, is this correct:- typedef struct { long frequency; } Structure; Structure my_struct = {0};
1
by: bobh | last post by:
Hi All, I recently asked the DBA of the SQLServer database that I use to add a field and set the 'allow zero length strings' to No. after a couple more emails back and forth I got this one ...
0
by: =?Utf-8?B?Qm9iaWw=?= | last post by:
I run under SYSTEM account the code posted below. My goal is run an executable in a specific user context. With Windows XP works fine but with Vista the executable doesn't run. anyone can help me?...
3
by: angi35 | last post by:
I'm having a zero-length string problem... Hoping someone can help. (This is in Access 2000.) In FormA, I have a button that opens FormB with OpenArgs. In FormB, the OpenArgs are translated into...
0
by: mrchatgroup | last post by:
news from http://www.mrchat.net/myblog/myblog/small-accidents-mean-big-trouble-for-supercollider.html Small Accidents Mean Big Trouble for Supercollider Image Scientists expect startup...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.