473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5618
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.chell o.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.chell o.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.SumOfB udget) AS SumOfSumOfBudge t

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.TblNode ID, TblNode.NodeLab el, "_
& "Sum(QryLevel3C ostTotals.SumOf Budget) AS SumOfSumOfBudge t, "_
& "Sum(QryLevel3C ostTotals.SumOf Variation) AS SumOfSumOfVaria tion, "_
& "Sum(QryLevel3C ostTotals.LastO fCommitted) AS SumOfLastOfComm itted, "_
& "Sum(QryLevel3C ostTotals.LastO fActual) AS SumOfLastOfActu al, "_
& "Sum(QryLevel3C ostTotals.LastO fWork) AS SumOfLastOfWork , "_
& "Sum(QryLevel3C ostTotals.LastO fAccrual) AS SumOfLastOfAccr ual "_
& "FROM TblNode"_
& "GROUP BY TblNode.TblNode ID, TblNode.NodeLab el} "_
&"APPEND {SELECT TblNode.TblNode ID, TblNode.NodeLab el,
TblMainEntry.cb sID, TblCBSandBudget .CBSdescription , " _
& "Sum(TblCBSandB udget.Budget) AS SumOfBudget, "_
&
"Sum(IIf(IsNull ([TblMainEntry].[Variation]),0,[TblMainEntry].[Variation]
)) AS SumOfVariation, " _
&
"Last(IIf(IsNul l([TblMainEntry].[Committed]),0,[TblMainEntry].[Committed
])) AS LastOfCommitted , " _
& "Last(IIf(IsNul l([TblMainEntry].[Actual]),0,[TblMainEntry].[Actual]))
AS LastOfActual," _
& "Last(IIf(IsNul l([TblMainEntry].[Worked]),0,[TblMainEntry].[Worked]))
AS LastOfWork," _
&
"Last(IIf(IsNul l([TblMainEntry].[Accrual]),0,[TblMainEntry].[Accrual]))
AS LastOfAccrual," _
&
"Last(IIf(IsNul l([TblMainEntry].[EntryDate]),0,[TblMainEntry].[EntryDate
])) AS LastOfEntryDate " _
& "FROM (TblMainEntry RIGHT JOIN TblCBSandBudget ON TblMainEntry.cb sID
= TblCBSandBudget .cbsID) " _
& "INNER JOIN TblNode ON TblCBSandBudget .NodeID = TblNode.TblNode ID " _
& "GROUP BY TblNode.TblNode ID, TblNode.NodeLab el, TblMainEntry.cb sID,
TblCBSandBudget .CBSdescription " _
& "HAVING
(((Last(IIf(IsN ull([TblMainEntry].[EntryDate]),0,[TblMainEntry].[EntryDa
te])))<#9/1/2003#))"_
& "} AS QryLevel3CostTo tals "_
&"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
2729
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 to sql server and the "inner join" syntax must be preserved for a large fraction of the queries), AddNew and Update methods fail.
12
18657
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 LEFT JOIN UserTeamAssoc UTA ON UTA.userID = U.userID, Role R, UserRoleAssoc URA, Team T WHERE U.userID = URA.userID AND URA.roleID = R.roleID AND...
10
10518
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 tblEntity.Entity_ID = seach3220.Entity_ID SET tblEntity.Cat_ID = 289; The only issue I can imagine aside from syntax is that Entity_ID is not...
16
5709
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 got a nudge in the right direction from Mr. Kreft. I promised to provide details once working, so here it is. The code is shown below. My next...
4
1504
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 have a textbox for searching, a listbox to display the searched results, and a big textbox (memo) to display the clicked-results of the listbox item....
2
3242
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 MySQlL 5. In My first select statement I get all my records from Table B SELECT `table_A`.`ITEM`, `table_A`.`DECSCRIPTION`, `table_A`.`UM`,...
52
6278
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 variations(combination of fields), - then act on each group in some way ...eg ProcessRs (oRs as RecordSet)... the following query will get me the...
4
2420
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* where * is a wildcard for letters after rs. Thanks. -- Message posted via AccessMonster.com
14
2484
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 edit any of the fields, the PC bleeped. Seems it was due to the query the form was based on. Again, editing any of the fields of the query...
0
7697
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.