Senin, 13 April 2015

RE: [MS_AccessPros] r SQL Server query to Access

 

Art,
 
If the query doesn't need to be updateable, I would create a pass-through query and use the SQL Server syntax.
 
If you need to re-write this in Access, you should try to replace the single quotes with double quotes.
 
Do you understand the difference between '' and Null? I would consider using:
   city & "" <> ""'
 
Duane Hookom, MVP
MS Access
 

To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Mon, 13 Apr 2015 07:58:56 -0700
Subject: [MS_AccessPros] r SQL Server query to Access




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: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar