CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 CCDLookup with null value

Print topic Send  topic

Author Message
deagon

Posts: 31
Posted: 02/20/2007, 10:53 AM

Is there a way to do a CCDLookup with sum value and use null as a factor. Currently my code
looks like this.

Dim Conn
Dim Sum1
Dim Sum2
Dim Sum3
Dim Sum4
Set Conn = new clsDBjobstatus
conn.open

Sum1 = CCDLookup("SUM(orderValue)","Jobs","SalesRelease between '2007-01-01 00:00:00' and '2007-01-31 00:00:00'",Conn)
Sum2 = CCDLookup("SUM(ordervalue)","Jobs","ActualShipDateToCustomer between '2007-01-01 00:00:00' and '2007-01-31 00:00:00'",Conn)
sum3 = 3000000.00 ' Start Value of Backlog from last year
Sum4 = sum3 + sum2 'Current backlog for Jan including last year
EventCaller.value = Sum4 - Sum1
BackorderFWD = Sum4 - Sum1

Is there clean way to do a CCDLookup with Sum2 above and sort the data by the ActualShipDateToCustomer is a null value? I want only the shipdates that have no Ship dates.

Does this make Sense????
View profile  Send private message
peterr


Posts: 5971
Posted: 02/20/2007, 2:36 PM

Most likely this is possible but I'm not sure if I fully understand your question. Are you trying to retrieve multiple records in specific order, or first record that matches certain condition?

It may also be worth taking a look at the CCDLookUp funtion in Common.asp, to understand that it's same as execution a single SQL statement:
SQL = "SELECT " & ColumnName & " FROM " & TableName & " WHERE " & Where
Connection.Execute(SQL)
So whatever can be retrieved from database via SQL can be done either via CCDLookUp or by executing similar SQL statements directly.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
deagon

Posts: 31
Posted: 02/20/2007, 2:49 PM

Instead of just getting the value of tableColumns between dates, I'm trying to get only the value of the Table Column when it has no value set. We have a date in a Column field that tells us when we have a Actual ship to Customers. My form needs to get the same data below in sum2 except the ActualShipDateToCustomer needs to be zero. No data in that field. Thats what we call part of our backlog distribution calculations. I'm currently using this lookup below but instead of straight data value I need the one field to be null or no value. Set to no date in that field. So what I'm trying to get is the same date except with a sort in the command that only returns the ordervalue of actualSHipDateTOCustomer that has not been specified. I hope this makes some sense.
Sum2 = CCDLookup("SUM(ordervalue)","Jobs","ActualShipDateToCustomer between '2007-01-01 00:00:00' and '2007-01-31 00:00:00'",Conn)
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.