473,406 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

JOIN recordsets

Is it possible to INNER JOIN two recordsets in ASP? I don't mean the normal
JOIN you would use with two tables, but actually join the recordsets in ASP?
Jul 19 '05 #1
4 5610
It would make more sense to get the data in a joined state, but I'll assume
you have a good reason not to.
You could create a new recordset and add the values from the two recordsets.
You could move everything to an array.

I think we'd need more detail to be helpful

"Marco Alting" <ma***@alting-multimedia.nl> wrote in message
news:kC**********************@amsnews03.chello.com ...
Is it possible to INNER JOIN two recordsets in ASP? I don't mean the normal JOIN you would use with two tables, but actually join the recordsets in ASP?

Jul 19 '05 #2
In a way, yes... you will have to use the SHAPEd queries to do this.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Marco Alting" <ma***@alting-multimedia.nl> wrote in message
news:kC**********************@amsnews03.chello.com ...
Is it possible to INNER JOIN two recordsets in ASP? I don't mean the normal JOIN you would use with two tables, but actually join the recordsets in ASP?

Jul 19 '05 #3
I'm trying to implement the SHAPEd queries, but I'm not sure how to
translate my Access queries to the shaped ones. Let me explain a litle
bit further; I have three levels of values, the lowest level being a Sum
and LastOf fields of cost items (thats the first query lets call it
Qry3), Then in Qry2 a level higher, all values of Qry3 are Summed again
using a related table and an ID. And Qry1 is a Summing of all values in
Qry2. So in Access it goes something like this for Qry2:

Sum(Qry3.SumOfBudget) AS SumOfSumOfBudget

I the line above, the SumOfbudget is referenced from the Qry3 query. Can
I do the same call in the SHAPEd query?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4
Here's my (not working) SHAPEd query, can you tell me whats wrong here:

"SHAPE {SELECT TblNode.TblNodeID, TblNode.NodeLabel, "_
& "Sum(QryLevel3CostTotals.SumOfBudget) AS SumOfSumOfBudget, "_
& "Sum(QryLevel3CostTotals.SumOfVariation) AS SumOfSumOfVariation, "_
& "Sum(QryLevel3CostTotals.LastOfCommitted) AS SumOfLastOfCommitted, "_
& "Sum(QryLevel3CostTotals.LastOfActual) AS SumOfLastOfActual, "_
& "Sum(QryLevel3CostTotals.LastOfWork) AS SumOfLastOfWork, "_
& "Sum(QryLevel3CostTotals.LastOfAccrual) AS SumOfLastOfAccrual "_
& "FROM TblNode"_
& "GROUP BY TblNode.TblNodeID, TblNode.NodeLabel} "_
&"APPEND {SELECT TblNode.TblNodeID, TblNode.NodeLabel,
TblMainEntry.cbsID, TblCBSandBudget.CBSdescription, " _
& "Sum(TblCBSandBudget.Budget) AS SumOfBudget, "_
&
"Sum(IIf(IsNull([TblMainEntry].[Variation]),0,[TblMainEntry].[Variation]
)) AS SumOfVariation, " _
&
"Last(IIf(IsNull([TblMainEntry].[Committed]),0,[TblMainEntry].[Committed
])) AS LastOfCommitted, " _
& "Last(IIf(IsNull([TblMainEntry].[Actual]),0,[TblMainEntry].[Actual]))
AS LastOfActual," _
& "Last(IIf(IsNull([TblMainEntry].[Worked]),0,[TblMainEntry].[Worked]))
AS LastOfWork," _
&
"Last(IIf(IsNull([TblMainEntry].[Accrual]),0,[TblMainEntry].[Accrual]))
AS LastOfAccrual," _
&
"Last(IIf(IsNull([TblMainEntry].[EntryDate]),0,[TblMainEntry].[EntryDate
])) AS LastOfEntryDate " _
& "FROM (TblMainEntry RIGHT JOIN TblCBSandBudget ON TblMainEntry.cbsID
= TblCBSandBudget.cbsID) " _
& "INNER JOIN TblNode ON TblCBSandBudget.NodeID = TblNode.TblNodeID " _
& "GROUP BY TblNode.TblNodeID, TblNode.NodeLabel, TblMainEntry.cbsID,
TblCBSandBudget.CBSdescription " _
& "HAVING
(((Last(IIf(IsNull([TblMainEntry].[EntryDate]),0,[TblMainEntry].[EntryDa
te])))<#9/1/2003#))"_
& "} AS QryLevel3CostTotals "_
&"RELATE {TblNodeID TO TblNodeID}"

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Richard | last post by:
Hi, I work on a VB6 software using ADO to connect to Oracle 9.2i. When I create a recordset based on a query containing a "inner join" clause (sql server syntax, the software connects also...
12
by: Phil Powell | last post by:
<cfquery name="getAll" datasource="#request.dsn#"> SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn, U.choiceId, U.experience, T.label AS teamLabel, R.label AS roleLabel FROM User U...
10
by: deko | last post by:
I've tried each of the below, but no luck. UPDATE tblEntity As tbl INNER JOIN search3220 As qry ON tbl.Entity_ID = qry.Entity_ID SET tbl.Cat_ID = 289; UPDATE tblEntity INNER JOIN search3220 ON...
16
by: Randy Harris | last post by:
I was inspired by the recent discussion of returning multiple recordsets to ADO from a stored procedure. (Amazed is probably more accurate). I asked about how to accomplish same with Oracle and...
4
by: mrmagoo | last post by:
I'm building a vb.net Forms project that is getting data from a SQL Server database. One of the main goals of the project is to be really responsive to events, such as textbox change events. I...
2
by: kevinjbowman | last post by:
I am by no means a SQl Jedi as will be apparent by my question, but I can usually figure out a select statement on my own. I have one today though that really has me stumped. I am working in...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
4
by: rdemyan via AccessMonster.com | last post by:
Can someone help me with creating code that will look for DAO recordsets in modules and then check to see if the recordset is also closed in the module. All of my recordsets are of the form rs*...
14
by: cjakeman | last post by:
Hi, Solved a little mystery yesterday when I built a form that combined 2 tables with a 1:M relationship and relational integrity. All the correct data was visible on the form but, if I tried to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.