CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 SQL QUERY RESULTS NOT CONSISTENT WITH GRID RESULTS

Print topic Send  topic

Author Message
Gabs
Posted: 11/26/2002, 8:29 AM

Hi all,

I am currently having problems with my grids in the following case

I have a Query that looks like

SELECT *
FROM [External]
WHERE PartNum LIKE '{s_keyword}%' AND ClosedBy IS NULL
ORDER BY PartNum

When I do "Review Data" it shows the correct output, does not include
any record which has NULL in the ClosedBy Field; however, when the grid
runs it displays all the records, it does not "obey" the "AND ClosedBy IS NULL" portion.

Same if I used "AND ClosedBy IS NOT NULL"; On review Data it displays the correct output, yet the grid displays those that
are and are not NULL ...

Any thoughts about this?

Thanks in advanced for your help,

Gab

Gabs
Posted: 11/26/2002, 3:05 PM

Hi again all,

Well I was able to solve the problem by just adding a parenthesis
to ClosedBy IS NULL

CCS does not add a parenthesis and somehow the query will not run properly when displaying the Grid. Yet doing a "Review Data" shows that the query works.

Oh well

My code now simply looks like

SELECT *
FROM [External]
WHERE PartNum LIKE '{s_keyword}%' AND (ClosedBy IS NULL)
ORDER BY PartNum

Thanks,
Gab
GreggB
Posted: 11/26/2002, 3:21 PM

I had the same problem with MS SQL using the CCS Query Builder. I used a "LEFT JOIN" to solve the problem NULLS.

GreggB

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.