Senin, 13 April 2015

[MS_AccessPros] Re: r SQL Server query to Access

 

Art


First save each of those 2 nested queries as queries. Then use them as tables in your main query. If you don't want to do that then try putting brackets around Class. It's probably a reserved word.
custclas AS [Class]




---In MS_Access_Professionals@yahoogroups.com, <dbalorenzini@yahoo.com> wrote :

Is there a app or can someone help me to convert the following SQL Server Query to Access query:


SELECT a.CustID, a.UnitID, *
FROM (select custnmbr AS CustID, custclas AS Class, ADRSCODE AS UnitID,Hold,
CUSTNAME AS TenantName,
address1, address2, city, state, zip from RM00101
where INACTIVE = 0 and city <> ' ' AND CUSTCLAS='Rental' and Hold = 0

)  AS a INNER JOIN (Select CUSTNMBR, CUSTNAME, LOCNCODE, LOCNDSCR, BSSI_PortfolioID, BSSI_Description1,
BSSI_Tenant_Lease_Status, BSSI_Lease_Execution_Dat, BSSI_Lease_Termination_D
From B4602200 where
BSSI_Tenant_Lease_Status = 2)  AS b ON a.CustID = b.CUSTNMBR;


WHen I try to run this in ACCESS    I get ODBC call error.


Thank you


Art Lorenzini

South Dakota.

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

.

__,_._,___

Tidak ada komentar:

Posting Komentar