CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Visual Query Builder

Print topic Send  topic

Author Message
sbryant

Posts: 3
Posted: 03/14/2006, 3:09 PM

I am new to CCS and fairly light on SQL, but I am getting towards the small application I need to build, which is great. I am trying to use the Query Builder to return data from 2 more pages than the entered value. i.e the users types in page 10 and the query return records on pages 10,11 and 12

Obviously what I have below doesn't work, but it sort of indicates what I am after ?

Table Parameter = type = URL
Parameter = s_PAGE+2

SELECT SOH.ITEM........................
FROM SOH
WHERE ITEM LIKE '{s_ITEM}%'
AND PAGE >= {s_PAGE}
AND PAGE <= {s_PAGE + 2}
ORDER BY ITEM

What is the best way to achieve this query result ?
Also, is there a way to actually edit the SQL statement directly?
TIA
Steve
View profile  Send private message
E43509

Posts: 283
Posted: 03/15/2006, 6:58 AM

Try this
SELECT SOH.ITEM........................
FROM SOH
WHERE ITEM LIKE '{s_ITEM}%'
AND PAGE >= {s_PAGE}
AND PAGE <= {s_PAGE} + 2
ORDER BY ITEM

What language are you writing in? You can also look at the code and before you execute, output the sql string to the screen so you can see what it really is trying to run. You can then take that sql string and run it natively against the db to ensure it returns the result you desire.
View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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