Computing.Net > Forums > Programming > sql union problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sql union problem

Reply to Message Icon

Name: intrepid_dave
Date: June 14, 2005 at 03:47:14 Pacific
OS: xp pro
CPU/Ram: amd 3200+, 1 gig ram
Comment:

Hi,
I wast to do a union of two tables in access:

table1 columns are:
Postcode|Private|Business|

table2 columns are
Postcode|Private|Business|Packs

The problem is i want to include Packs in the union and have null in that column for the table1 entries

How can i do this if the two table don't have matching columns as here?

Can anyone help??

David



Sponsored Link
Ads by Google

Response Number 1
Name: mdow
Date: June 14, 2005 at 05:28:31 Pacific
Reply:

Create a subquery in your table1 select statement. Use the Nz function in your subquery to insert a value when you have a table1 record with no mathching table2 (Packs)record.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: sql union problem

Access 97 and SQL program problem www.computing.net/answers/programming/access-97-and-sql-program-problem/2448.html

ASP - Ms Access SQL Insert Problem www.computing.net/answers/programming/asp-ms-access-sql-insert-problem/898.html

sql increment counting www.computing.net/answers/programming/sql-increment-counting/11599.html