Subject | RE: [firebird-support] Multiselect or something like that |
---|---|
Author | Rick Debay |
Post date | 2006-06-13T20:34:39Z |
You can begin by changing the database. What happens if you need to have 101 articles for a customer?
Assuming a CUSTOMER table and an ARTICLE table, create a third table with at least two columns. The first is a foreign key to the CUSTOMER table, and the second is a foreign key to the ARTICLE table (you can have other columns with timestamps, why the link was made, etc; the usual meta-data).
This suggestion may be incorrect, I don't understand the number in the fields, is this the number of times a customer has read an article? If so, that can be another column in the table that links the two.
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of majstoru
Sent: Tuesday, June 13, 2006 3:36 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Multiselect or something like that
Hi,
Here is one interest situation. I have input form:
A01 A02 A03 A04 A05
Cust01 10 20 30 40 50
Cust02 15 10 15 10 20
Cust03 10 30 50 50 30
Cust04 5 3 2 1 10
In this sample A01-A05 are some articles, and Cust01-Cust04 are customers, the numbers in the midle are connection between articles and customers!
I have a few questions for the Firebird experts:
1. Is there eny SQL statement which will help me to find an article into table with out CASE statement or somethnig like that, because number of articles can be up to 100 article (table have 100 columns) 2. If I have few tables and article A05 which is on the 4 column into first table, 2 column into secound table, 10 column ... how to summariye all of this into one SQL statement.
Maybe it is a little complicated but here is a problem, if there is some solution that will be great.
Thanks ... :-)
------------------------ Yahoo! Groups Sponsor --------------------~--> Everything you need is one click away. Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/67folB/TM
--------------------------------------------------------------------~->
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Assuming a CUSTOMER table and an ARTICLE table, create a third table with at least two columns. The first is a foreign key to the CUSTOMER table, and the second is a foreign key to the ARTICLE table (you can have other columns with timestamps, why the link was made, etc; the usual meta-data).
This suggestion may be incorrect, I don't understand the number in the fields, is this the number of times a customer has read an article? If so, that can be another column in the table that links the two.
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of majstoru
Sent: Tuesday, June 13, 2006 3:36 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Multiselect or something like that
Hi,
Here is one interest situation. I have input form:
A01 A02 A03 A04 A05
Cust01 10 20 30 40 50
Cust02 15 10 15 10 20
Cust03 10 30 50 50 30
Cust04 5 3 2 1 10
In this sample A01-A05 are some articles, and Cust01-Cust04 are customers, the numbers in the midle are connection between articles and customers!
I have a few questions for the Firebird experts:
1. Is there eny SQL statement which will help me to find an article into table with out CASE statement or somethnig like that, because number of articles can be up to 100 article (table have 100 columns) 2. If I have few tables and article A05 which is on the 4 column into first table, 2 column into secound table, 10 column ... how to summariye all of this into one SQL statement.
Maybe it is a little complicated but here is a problem, if there is some solution that will be great.
Thanks ... :-)
------------------------ Yahoo! Groups Sponsor --------------------~--> Everything you need is one click away. Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/67folB/TM
--------------------------------------------------------------------~->
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links