473,587 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The trouble with Zero...

139 New Member
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 2493
acoder
16,027 Recognized Expert Moderator MVP
Are the rest set as NULL? Perhaps Coldfusion is treating them as 0.
May 12 '09 #2
ndeeley
139 New Member
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 Recognized Expert Moderator MVP
Did that solve the problem?
May 13 '09 #4
ndeeley
139 New Member
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
4944
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 webserver runs that part of the script (see attached file, snippet.php), though, it doesn't go through. I don't get an error message or...
9
2120
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 by removing the current
13
12723
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 3 Click here : www.c4swimmers.esmartguy.com to Test Your C Programming Strengths.
8
4546
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 date in the form of mm/dd/yyyy: "); scanf ("%i/%i/%i", &date1.month, &date1.day, &date1.year); where date1 is a struct of type date, defined as:...
27
1913
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 Python) In light of that, I have been trying to learn malloc, realloc, and free, but to no avail. But for some reason, I'm getting segfaults right...
4
1777
by: Nick Keighley | last post by:
Hi, is this correct:- typedef struct { long frequency; } Structure; Structure my_struct = {0};
1
1281
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 "SQL Server does not support a Zero Length String. The only way to ensure that we won't get a Zero Length is to make the field not nullable."
0
1917
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? Thanks very much. Here is the code: -----------------------------------------------------------------
3
2177
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 default values for certain controls. FormB is a continuous form. For this reason, I can't assign .Value -- it has to be .DefaultValue. Otherwise...
0
1662
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 glitches in the massive, complex machines they use to smash atoms.
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8216
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7974
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8221
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5719
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.