query SQL view question

  • Thread starter Thread starter Josh
  • Start date Start date
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
 
Hi Josh,
Try concatenating from vendors.

Select Vendors.FName & Vendors.VName AS [Payor/Payee]....
 
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
.
.
 
Back
Top