Hi all,
I wonder if anyone can help? I have a need to display some data on my
web page (the results of a search) for links. Here's the thing: Each
link can belong to one or more category (yes, I have a many-to-many
table). When the links are retrieved, I also want to retrieve the
categories the link is found in.
Let's say link A appears in categories X, Y, and Z, and a keyword
search brings back link A - due to the way the query is structured
(inner join), link A is retrieved three times due to it's presence in
categories X, Y, and Z.
The question is: How do I retrieve the categories (of which there may
be 1 or more for each link) along with the link? Or can't I?
I was thinking of multiple selects in a stored procedure (so they
could be put into separate dataset tables), but that would need some
correlation between the links found in the first query (i.e. the one
that finds the links) and the second (the one that retrieves the
categories for the links that have been found).
Alternatively, I could just cache the category table, along with the
LinkToCategory table and as I'm writing each entry to the page, look
up the corresponding category then - if I'm using a DataRepeater, I
think I can use the Item_Created event...
However, I don't really want to do that, I'd rather do it at the
database level. Any thoughts?
Kind regards,
Mike K. 0 1276 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Darko Jovisic |
last post by:
Hi!
Another silly question:
If a stored procedure returns multiple result sets, how do I choose the one
I want to insert into a table?
For example sp_spaceused returns two result sets if object name is ommited.
I only need the first result set. How do I do that?
|
by: Oksana Yasynska |
last post by:
Hi all,
I'm running Postgres 7.2.1 and I need to return multiple row sets from plpgsql
function. I'm new in plpgsql but according documentation and everything I
could find in the mailing list I need to switch to 7.3 to get at least SETOF
rows as a result.
I can't really upgrade Postgres now. Is there is any a workaround idea to
retrieve multiple rowsets?
|
by: Stanley Sinclair |
last post by:
I have a need to return multiple result sets from a stored procedure.
Want that SP to call others to get the data.
Win2003, db2 8.1.5.
Can't figure out how to handle open cursors, and return >1 result
sets.
Thought about global temp tables.
|
by: Randy Foster |
last post by:
We have a stored procedure (on DB2 8.1 FP5) that returns multiple
result sets which we are calling from Java (WebSphere 5.0.2.8).
We can call the stored procedure from the DB2 command line
successfully.
When we call it from WebSphere, we get the following error:
Execution failed due to a distribution protocol error that caused
deallocation of the conversation. A DRDA Data Stream Syntax Error was
|
by: Liz |
last post by:
Anyone have any info on how you can fill a DataSet with mutiple result sets
from a SQL batch ? I know with a dataReader you can use the nextResult
method but I'm lost on how you do this with a dataAdapter ....
TIA ..
L
| |
by: prad |
last post by:
Hi,
Following java code returns 24 result sets.It counts number of rows in the first result set correctly.But doesnt count rows from next result set.
When I debugged the code I found out that first time it enters in the loop while(rs.next()).But from the next result set it doesn't enter that loop as rs.next() returns false.DB2 is used as backend.
thanx 4 help.
import java.sql.*;
import java.io.*;
public class exportdds33 {
static...
|
by: Mike |
last post by:
Is it possible to use a SqlDataSource to return multiple result sets and if
so, how do I access them?
Thanks
|
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= |
last post by:
I am wondering if someone could provide a code sample (or just a suggested
approach) on how to fill a single DataGridView with multiple result sets. For
example, this statement returns a one-line result set for each table in the
database:
EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?'"
It would be handy to be able to put them all into one DataGridView. I would
like to be able to handle an arbitrary SQL statement; above is just...
|
by: anilkodali |
last post by:
How to compare multiple result sets with a set of values? Here is the scenario..
My query returns me multiple results(one column of data) and I want compare all the data at once with a set of data. For example my query returns 1,2,3 and I want compare the result set with (1,3), can I do that using a query with out using stored procedures? Obviously using the in clause isn't working(i.e., (1,2,3) in (1,3)), any other alternative.
Thanks,
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |