CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 CCLookup

Print topic Send  topic

Author Message
Hein
Posted: 11/19/2003, 11:23 AM

Need some help with this one:

I want to find one record in a table using two search variables. Let's say in a table you have a colletion of AssetID's and a collection of dates. I want to find the one unique record where the AssetID is equal to a certain number and the date is also equal to a certain date - how can I do that in ASP and CC studio? Thanks in advance!
Edd
Posted: 11/20/2003, 5:32 PM

Firstly define / test your SQL in a query builder so you know how to get the specific result you want.

Then transpose that back in to CCS, eg
Select Top 1 AssetID from Assets inner join Assets.Prime ON Asset.PrimaryAsset = Assets.PrimaryAsset where (Asset.StartDate > '2003-01-01' and Asset.EndDate < '2003-31-12' OR Asset.EndDate IS NULL) and Asset.PrimaryAsset = 1234)

would be a CCDLookup as
AssetID = CCDLookup("Top 1 AssetID", "Assets inner join Assets.Prime ON Asset.PrimaryAsset = Assets.PrimaryAsset", "(Asset.StartDate > '2003-01-01' and (Asset.EndDate < '2003-31-12' OR Asset.EndDate IS NULL)) and Asset.PrimaryAsset = 1234), DBwhatever)

Hope this helps
Edd

   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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