# `viw_ai_customer` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sSlaveId` | `varchar(100)` | NO |
| 3 | `sBrandsId` | `varchar(100)` | NO |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |
| 5 | `tCreateDate` | `datetime` | NO |
| 6 | `sCustomerNo` | `varchar(255)` | NO |
| 7 | `sCustomerName` | `varchar(255)` | NO |
| 8 | `sMobile` | `varchar(255)` | YES |
| 9 | `sCity` | `varchar(255)` | YES |
| 10 | `sProvince` | `varchar(255)` | NO |
| 11 | `sEmail` | `varchar(255)` | YES |
| 12 | `sInvoiceTaxNo` | `varchar(255)` | NO |
| 13 | `sCompanyAddress` | `varchar(255)` | YES |
| 14 | `sCustomerSortName` | `varchar(255)` | YES |
| 15 | `sSalesManName` | `varchar(255)` | YES |
| 16 | `sDepartName` | `varchar(255)` | YES |
| 17 | `sGetPaName` | `varchar(255)` | YES |
| 18 | `sContacts` | `varchar(255)` | YES |
| 19 | `tUpdateDate` | `datetime` | NO |
| 20 | `sPhone` | `varchar(255)` | YES |

## Definition

```sql
select `elecustomer`.`sId` AS `sId`,`elecustomer`.`sId` AS `sSlaveId`,`elecustomer`.`sBrandsId` AS `sBrandsId`,`elecustomer`.`sSubsidiaryId` AS `sSubsidiaryId`,`elecustomer`.`tCreateDate` AS `tCreateDate`,`elecustomer`.`sCustomerNo` AS `sCustomerNo`,`elecustomer`.`sCustomerName` AS `sCustomerName`,`elecustomer`.`sMobile` AS `sMobile`,`elecustomer`.`sCity` AS `sCity`,`elecustomer`.`sProvince` AS `sProvince`,`elecustomer`.`sEmail` AS `sEmail`,`elecustomer`.`sInvoiceTaxNo` AS `sInvoiceTaxNo`,`elecustomer`.`sCompanyAddress` AS `sCompanyAddress`,`siscustomerclassify`.`sName` AS `sCustomerSortName`,`sissalesman`.`sName` AS `sSalesManName`,`sisdepart`.`sName` AS `sDepartName`,`sispayment`.`sName` AS `sGetPaName`,`elecustomer`.`sContacts` AS `sContacts`,`elecustomer`.`tCreateDate` AS `tUpdateDate`,`elecustomer`.`sPhone1` AS `sPhone` from ((((`elecustomer` left join `siscustomerclassify` on((`siscustomerclassify`.`sId` = `elecustomer`.`sParentId`))) left join `sispayment` on((`sispayment`.`sId` = `elecustomer`.`sGetPayId`))) left join `sissalesman` on((`sissalesman`.`sId` = `elecustomer`.`sSalesManId`))) left join `sisdepart` on((`sisdepart`.`sId` = `sissalesman`.`sDepartId`)))
```

## Narrative

_No human-written narrative yet._
