473,473 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

distinct field from two similar tables

Hi Friends,

I am kinda stuck with a SQL query, can some one please guide me?

I have two 'similar' tables
a) open_works_table
b) closed_works_table
now, closed_works_table have 2 extra fields compared with
open_works_table all other fields are same(name and type).

The reason for two similar tables is because open works is quite used
and contain only few rows compared to the huge number of closed
works(rarely used).

I want to get the DISTINCT list of all job_types(a field in both
table) from the two tables. How to get it? these two tables are not
related, just similar. I think, I can just pass a query
SELECT DISTINCT(job_type)
FROM {concatenated openworkstable and closedworks table}

But how to join two tables one below the other? or is there is some
other solution?

TIA
Vijoy
Jul 19 '05 #1
0 2038

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

Similar topics

9
by: Dave M | last post by:
All I've got a database that keeps track of sales of widgets. Each company that belongs to my organiztion is to report their widget sales or no sales every month. There are several different...
0
by: Vijoy Varghese | last post by:
Hi Friends, I am kinda stuck with a SQL query, can some one please guide me? I have two 'similar' tables a) open_works_table b) closed_works_table now, closed_works_table have 2 extra fields...
2
by: Maziar Aflatoun | last post by:
Hi everyone, I have 2 tables with table A containing an 'email' field and table B containing 2 fields 'primaryemail' and 'secondaryemail'. Now is it possible to issue a query that would return...
2
by: mfyahya | last post by:
I have two tables, both containing an 'authors' column. Is there a way to get a unique list of authors from the two tables? I tried SELECT DISTINCT `authors` from `table1`, `table2`; but I got an...
5
by: Fred Zuckerman | last post by:
Can someone explain the difference between these 2 queries? "Select Distinct id, account, lastname, firstname from table1" and "Select DistinctRow id, account, lastname, firstname from table1" ...
6
by: dick | last post by:
Am working with MS Access 2003 & tables downloaded from Oracle. Am not a GURU, more of a hacker, but have done a bit of everything in many languages/programs/etc. I have data fields in 2 tables...
2
by: Genalube | last post by:
I am running a query that includes the inclusion of memo fields, my query pulls from four different tables with one to many relationships between them. The relationships are such that when I run my...
4
by: Lacutas | last post by:
Hi all, I am having some problems using LINQ to access Distinct records from a Dataset. I have looked around and believe it should be as simple as added .Distinct() to my LINQ query below, though...
1
by: ggfota | last post by:
Hi I have a problem with SELECT DISTINCT query. I'm trying to solve why it causes error 3464. Guess that problem might be cause by one field. The source table has text(17) field from which I...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
1
isladogs
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...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.