query SQL view question

J

Josh

I have a query written in SQL as follows:

SELECT Vendors.VName AS [Payor/Payee]
FROM Vendors;

UNION Select Tenants.OccLNAme
From Tenants;

It gives me a list of all names from both my vendors and
tenants table for a drop down list on my form which i
like. The only problem is that it only gives me last names
of my tenants (it gives me everything i want for the
vendors) & i would like to add first name of tenants to
make less confusion. When i tried it gave me the
error "the number of columns in the two selected tables or
queries of a union query do not match."
---Any guesses on how to solve. thanks. Josh
 
L

Les

Hi Josh,
Try concatenating from vendors.

Select Vendors.FName & Vendors.VName AS [Payor/Payee]....
 
J

Josh

i'll try
-----Original Message-----
Hi Josh,
Try concatenating from vendors.

Select Vendors.FName & Vendors.VName AS [Payor/Payee]....

-----Original Message-----
I have a query written in SQL as follows:

SELECT Vendors.VName AS [Payor/Payee]
FROM Vendors;

UNION Select Tenants.OccLNAme
From Tenants;

It gives me a list of all names from both my vendors and
tenants table for a drop down list on my form which i
like. The only problem is that it only gives me last names
of my tenants (it gives me everything i want for the
vendors) & i would like to add first name of tenants to
make less confusion. When i tried it gave me the
error "the number of columns in the two selected tables or
queries of a union query do not match."
---Any guesses on how to solve. thanks. Josh
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top