473,395 Members | 2,010 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,395 software developers and data experts.

Table with 3 queries

Hi!!!!

I´m stuck with a problem

I have to make a table with the information of three different queries.
The table has 4 columns x n rows. The first and second columns must be
filled with the result of the first query, the third, with the result
of the second query and the fourth with the result of the third query.
All queries has the same number of results and the count(result) > 1

I made different combinations of while's but no one seems to work.

Any help or reference???

Thanks in advance!!!

Ezequiel

Dec 29 '05 #1
1 1394
zek2005 said the following on 29/12/2005 03:08:
Hi!!!!

I´m stuck with a problem

I have to make a table with the information of three different queries.
The table has 4 columns x n rows. The first and second columns must be
filled with the result of the first query, the third, with the result
of the second query and the fourth with the result of the third query.
All queries has the same number of results and the count(result) > 1

I made different combinations of while's but no one seems to work.


How are you associating different rows of the separate queries?
e.g. if Query 1 gives:

col1 col2
------------
A X
B Y
C Z

and Query 2 gives:

col1
----
D
E
F

and Query 3 gives:

col1
----
G
H
I

How do you expect MySQL (are you using MySQL? You didn't actually say)
to know how to combine these into one table?

There's nothing about that data that implies it should be combined as
follows:

col1 col2 col3 col4
----------------------------
A X D G
B Y E H
C Z F I

In which case, it's usually the wrong approach to put unrelated data
into one table.

If the data *is* related in some way, then that means that you should be
able to perform just one query, rather than three separate queries.

--
Oli
Dec 29 '05 #2

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

Similar topics

7
by: Wolfgang Kreuzer | last post by:
Hello all, I have two tables - Projects and ProjectStruct Table Projects contains master records of the projects, ProjectStruct allows to define a project herarchie and contains the fields...
4
by: Matik | last post by:
Hi, I have a small theoretical issue. I have one table, which is prettyu large. There is lot of evaluations running on this table, that's why, each process need to wait for another to be...
1
by: Roger Green | last post by:
I have inherited a complex database that has many dozens of queries that derive data from a people table. I now need to be able to run these queries (from within a significant number of forms)...
0
by: Gianfranco | last post by:
Hi I got a problem with 2 tables. I have a table, say A, with x records, coming from a make table query and a table, say B, with y records, coming from another make table query. I need to join...
3
by: John Baker | last post by:
Hi: I have developed a series of complex queries against a table named "timesheetsnew". These queries work fine. I now wish to apply exactly the same queries to an identically formatted table...
3
by: Janelle.Dunlap | last post by:
I have a table in my database that is linked to an excel spreadsheet. I need to be able to manipulate the data in this linked table so that I can create smaller normalized tables that work with...
3
by: Macbane | last post by:
Hello All, This has been bugging me for too long. I have a database that records medical interventions. I am familiar with the theory behind normalisation but am unsure what to do with the...
8
by: rshivaraman | last post by:
Hi : I have a TableA with around 10 columns with varchar and numeric datatypes It has 500 million records and its size is 999999999 KB. i believe it is kb i got this data after running...
2
by: KayC | last post by:
Hi, I use Access2002 SP3. I have taken ownership of a mdb which I would like to redesign. I want to repoint all current queries from a daily table to a new historic table. There are over 30 queries...
9
by: Mourad | last post by:
Hi All, Is it possible to create a Make Table query in access (2.0 and 2003) that creates the table into a SQL Server database? Following the steps: 1- Create New Query 2- Set Query Type as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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,...
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,...

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.