Create Single Field Combining Two Diferent Fiels from A Query

waholtmn

Registered User.
Local time
Today, 03:41
Joined
May 17, 2012
Messages
19
This is for simplicity sake.

I have two queries. Both single record queries with one field in each. Query 1 Field is a File ID stored as text in one format (CCYYMMDD- <AnyText>) and Query 2 field is also a File ID stored as text but in an entirely different format. I want to combine these together.

Example

Query 1

Project File ID
20120720-111111HK

Query 2
Test Results File ID
MNJK-111111

The results need to look like this...

File ID
20120720-111111HK
MNJK-111111

I do not know SQL or VBA so any assistance you can garner would be fantastic.

Thanks!
 
Based on the sample data you provided, you need a UNION query (http://www.techonthenet.com/sql/union.php). This is the SQL for your example:

Code:
SELECT [Project File ID] AS FileID FROM [Query 1]
UNION ALL
SELECT [Test Results File ID] AS FileID FROM [Query 2];
 
Thanks Plog...I found the Union as well...its a nice little piece of info to know.
 

Users who are viewing this thread

Back
Top Bottom