CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 "as of"sql querry

Print topic Send  topic

Author Message
itzumar

Posts: 88
Posted: 06/01/2013, 11:58 AM

i have table

month amount

april13 500
may13 600
june13 500

now i want sql querry liek that

if i enter may 13, than sql genrate all data of may13 as well as previous

when i enter june13,than sql genrate all data of june13 as well as previous



_________________
Umar
View profile  Send private message
solesz

Posts: 137
Posted: 06/02/2013, 3:41 AM

O.K. Go for it. :)
Unless you have a question, there are no answers.

http://www.w3schools.com/sql/sql_func_sum.asp
http://www.w3schools.com/sql/sql_where.asp

schematically: SELECT SUM(what_I_need) FROM data_source WHERE date =< a_given_date

The exact statement may depends on the SQL database what you use (MySQL, MSSQL, etc)
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.