hello group,
i want to denormalize data in a temporary table for a second
business-system which cant read related datas
what i have:
table Partner: (Id_Partner, NamePartner, ...)
table PartnerProduct: (Id_PartnerProduct, NamePartnerProduct, ...)
table Partner2PartnerProduct: (Id, Id_Partner, Id_PartnerProduct)
Partner to PartnerProduct ist n:m relation (thats why i need
Partner2PartnerProduct)
and the temporary table
TempPartner: (Id_Partner, NamePartnerProducts)
whereas NamePartnerProducts should contains a comma separated list of
the PartnerProduct-Names
what i need:
a trigger or combination of trigger and SP which
operate like the following:
if on Partner2PartnerProduct is a Insert or Update made, then Delete
the row in TempPartner which has the Id of the Partner, and then
create a new row which contains all n:m joined PartnerProduct-Names in
it.
i hope the intention and problem are clear.
thanx for answers,
hans 1 3553
"Hans Bampel" <we**********@gmx.de> wrote in message
news:73**************************@posting.google.c om... hello group,
i want to denormalize data in a temporary table for a second business-system which cant read related datas
what i have: table Partner: (Id_Partner, NamePartner, ...) table PartnerProduct: (Id_PartnerProduct, NamePartnerProduct, ...) table Partner2PartnerProduct: (Id, Id_Partner, Id_PartnerProduct)
Partner to PartnerProduct ist n:m relation (thats why i need Partner2PartnerProduct)
and the temporary table TempPartner: (Id_Partner, NamePartnerProducts) whereas NamePartnerProducts should contains a comma separated list of the PartnerProduct-Names
what i need: a trigger or combination of trigger and SP which operate like the following: if on Partner2PartnerProduct is a Insert or Update made, then Delete the row in TempPartner which has the Id of the Partner, and then create a new row which contains all n:m joined PartnerProduct-Names in it.
i hope the intention and problem are clear.
thanx for answers, hans
The usual answer is that you should handle this in a client tool, rather
than in the database itself. There are ways to do it, but the only really
reliable way is a cursor (and if you need the comma-separated list in an
order, it's probably the only way), and cursors are slow: http://www.aspfaq.com/show.asp?id=2279
Simon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jarrod Morrison |
last post by:
Hi All
Im generally a vb programmer and am used to referencing multiple records
returned from a query performed on an sql database and im trying to move
some functions of my software into sql...
|
by: Josh |
last post by:
I have a database design question and wanted to see if folks could lend some
advice. For simplicity sake, I'll illustrate using a book (but the
hierarchy is the same in the real application - just...
|
by: Roman Prigozhin |
last post by:
Hi all,
I have one stored procedure where I defined 3 temporary tables, which
i return back to java. I want to have 3 separate sub procedures which
would go after the data and fill out these...
|
by: Farina |
last post by:
Hello,
I have a table that contains contact names, their titles, and
company_IDs that are used as the Primary Key. There are multiple
contact names and titles per each company_ID. I need to have...
|
by: Steve Atkins |
last post by:
I have an application where each user session opens and maintains a
long-lived connection to the postgresql backend database.
I need to keep a small amount of information (things like a unique...
|
by: Jeff |
last post by:
For years I have been using VBA extensively for updating data to tables
after processing. By this I mean if I had to do some intensive processing
that resulted in data in temp tables, I would have...
|
by: crane.jake |
last post by:
Hi, I'm trying to find the following information from the table found
bellow.
Year_Sales - # of sales that have occurred this year
Year_Income - SUM(amount)
Month_Sales - # of sales that have...
|
by: Chris |
last post by:
All
I am cross-posting, as I'm not sure if this is an issue for the data layer
or the application layer. If this is unacceptable, can someone let me know
so that I don't do this in future.
...
|
by: insirawali |
last post by:
Hi all,
I have this problem, i need to know is there a way i cn use the data
adapter's update method in this scenario.
i have 3 tables as below
create table table1{
id1 int identity(1,1)...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |