mysqlimportodbcstamps.com

MYSQL Code error, ODBC connector for stamps.com


I'm trying to update this script for use on the stamps.com servers.

The ssx_customers.name value comes from another table.

SELECT
contacts_cstm.num9c             as OrderId,
contacts_cstm.order_compleate_c     as OrderDate,
contacts_cstm.num9c             as RecipientFirstName,
contacts_cstm.ship_address_c    as RecipientLastName,
contacts_cstm.bisname_c         as RecipientCompany,
contacts_cstm.ship_address_city_c   as RecipientAddress1,
ssx_customers.name          as RecipientAddress2,


FROM contacts_cstm

LEFT OUTER JOIN ssx_customers
ON contacts_cstm.ssx_customers_id_c = ssx_customers.id


WHERE contacts_cstm.order_compleate_c BETWEEN #09/09/2018# AND #09/12/2018#

How can I accomplish this task?


Solution

  • As mentioned in the comments, there should be no comma on the last select:

    SELECT
    contacts_cstm.num9c             as OrderId,
    contacts_cstm.order_compleate_c     as OrderDate,
    contacts_cstm.num9c             as RecipientFirstName,
    contacts_cstm.ship_address_c    as RecipientLastName,
    contacts_cstm.bisname_c         as RecipientCompany,
    contacts_cstm.ship_address_city_c   as RecipientAddress1,
    ssx_customers.name          as RecipientAddress2 -- ',' was here
    
    
    FROM contacts_cstm
    
    LEFT OUTER JOIN ssx_customers
    ON contacts_cstm.ssx_customers_id_c = ssx_customers.id
    
    
    WHERE contacts_cstm.order_compleate_c BETWEEN #09/09/2018# AND #09/12/2018#