Selasa, 29 Maret 2016

Re: [MS_AccessPros] SQL to Acces SQL


SELECT custnmbr AS CustID, custclas AS Class, ADRSCODE AS Unit, 

    Hold, Trim(Left([Custname], InStr([Custname], ",") -1)) AS LastName,
    CUSTNAME AS TenantName, Address1, address2, city, state, zip
FROM RM00101
WHERE Inactive = 0 AND city <> " " AND CUSTCLAS = "Rental" AND Hold = 0
ORDER BY Unit, LastName;

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)

On Mar 29, 2016, at 2:44 PM, [MS_Access_Professionals] <> wrote:

Can someone help me translate this from T-SQL to Access SQL:

select custnmbr AS CustID, custclas AS Class, ADRSCODE AS UnitID,Hold,

LTRIM(RTRIM(SUBSTRING(CustName, 0, CHARINDEX(',', Custname)))) As LastName,


--LTRIM(RTRIM(SUBSTRING(CustName, CHARINDEX(',', CustName)+1, 8000)))As FirstName,

address1, address2, city, state, zip from RM00101

where INACTIVE = 0 and city <> ' ' AND CUSTCLAS='Rental' and Hold = 0

order by ADRSCODE ,  LastName

I am sure there is probably a tool that could help?

Thank you,

Art Lorenzini

Sioux Falls SD 


Posted by: John Viescas <>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)



Tidak ada komentar:

Posting Komentar