![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have two tables like these: (this is an example, the actual tables have diffferent fields and meanings) TABLE1 id person_name date_arrival date_departure TABLE2 id car_description date_arrival date_departure I'd like to make a query to have such resulting table RESULTING_TABLE id person_name car_description date_arrival date_departure the id is the primary key for the three tables and it's unique for the three (id in table1 cannot be in table2, I use the same counter to generate the id for table1 and table2). I is possible to create such a query? Thanks |
#3
| |||
| |||
|
|
Yes. But I wonder why on earth you want to join two distinct sets of data into a single result. I smell homework assignment... |
#4
| |||
| |||
|
|
Hi, I have two tables like these: (this is an example, the actual tables have diffferent fields and meanings) TABLE1 id person_name date_arrival date_departure TABLE2 id car_description date_arrival date_departure I'd like to make a query to have such resulting table RESULTING_TABLE id person_name car_description date_arrival date_departure the id is the primary key for the three tables and it's unique for the three (id in table1 cannot be in table2, I use the same counter to generate the id for table1 and table2). I is possible to create such a query? Thanks |
#5
| |||
| |||
|
|
Oh you want help writing it. okay, to help us help you, Can you provide data to show what you really want? |
#6
| |||
| |||
|
#7
| ||||
| ||||
|
|
Ed Prochak ha scritto: Oh you want help writing it. okay, to help us help you, Can you provide data to show what you really want? TABLE: person_tbl id name arrival_date age |
|
TABLE: tools_tbl id description arrival_date |
|
I want TABLE: result_tbl id name description arrival_date Is my solution this? |
|
SELECT id, name, arrival_date, age FROM prerson_tbl UNION SELECT id, description, arrival_date FROM tools_tbl is it correct? |
#8
| |||
| |||
|
|
Hi, I have two tables like these: (this is an example, the actual tables have diffferent fields and meanings) TABLE1 id person_name date_arrival date_departure TABLE2 id car_description date_arrival date_departure I'd like to make a query to have such resulting table RESULTING_TABLE id person_name car_description date_arrival date_departure the id is the primary key for the three tables and it's unique for the three (id in table1 cannot be in table2, I use the same counter to generate the id for table1 and table2). I is possible to create such a query? Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |