CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.

YesSoftware Forums -> Archive -> GotoCode Archive


Print topic Send  topic

Author Message
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!
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


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Internet Database

Visually create Web enabled database applications in minutes.

Home   |    Search   |    Members   |    Register   |    Login

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