# `viw_ai_productstock` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sCustomerNo` | `varchar(255)` | NO |
| 2 | `sCustomerName` | `varchar(255)` | NO |
| 3 | `sProductName` | `varchar(100)` | NO |
| 4 | `sProductNo` | `varchar(50)` | NO |
| 5 | `sProductStyle` | `varchar(50)` | NO |
| 6 | `sProductUnit` | `varchar(50)` | YES |
| 7 | `sCustomerProductNo` | `varchar(50)` | YES |
| 8 | `sWarehouseName` | `varchar(255)` | NO |
| 9 | `sLocationsName` | `varchar(255)` | YES |
| 10 | `sProductSortsName` | `varchar(100)` | YES |
| 11 | `sId` | `varchar(50)` | NO |
| 12 | `sSlaveId` | `varchar(50)` | NO |
| 13 | `sBrandsId` | `varchar(50)` | NO |
| 14 | `sSubsidiaryId` | `varchar(50)` | NO |
| 15 | `tUpdateDate` | `datetime` | NO |
| 16 | `sDefineNo` | `varchar(50)` | NO |
| 17 | `sDefineNo2` | `varchar(50)` | NO |
| 18 | `tmakedate` | `datetime` | NO |
| 19 | `dMaxStock` | `decimal(18,6)` | NO |
| 20 | `dMinStock` | `decimal(18,6)` | NO |
| 21 | `dProductQty` | `decimal(18,6)` | NO |
| 22 | `sDefineNo3` | `varchar(50)` | NO |
| 23 | `sWorkOrderNo` | `varchar(50)` | NO |
| 24 | `sOrderNo` | `varchar(50)` | NO |

## Definition

```sql
select `elecustomer`.`sCustomerNo` AS `sCustomerNo`,`elecustomer`.`sCustomerName` AS `sCustomerName`,`eleproduct`.`sProductName` AS `sProductName`,`eleproduct`.`sProductNo` AS `sProductNo`,`eleproduct`.`sProductStyle` AS `sProductStyle`,`eleproduct`.`sProductUnit` AS `sProductUnit`,`eleproduct`.`sCustomerProductNo` AS `sCustomerProductNo`,`siswarehouse`.`sName` AS `sWarehouseName`,`sislocation`.`sName` AS `sLocationsName`,`sisproductclassify`.`sName` AS `sProductSortsName`,`eleproductstock`.`sId` AS `sId`,`eleproductstock`.`sId` AS `sSlaveId`,`eleproductstock`.`sBrandsId` AS `sBrandsId`,`eleproductstock`.`sSubsidiaryId` AS `sSubsidiaryId`,`eleproductstock`.`tCreateDate` AS `tUpdateDate`,`eleproductstock`.`sDefineNo` AS `sDefineNo`,`eleproductstock`.`sDefineNo2` AS `sDefineNo2`,`eleproductstock`.`tMakeDate` AS `tmakedate`,`eleproductstock`.`dMaxStock` AS `dMaxStock`,`eleproductstock`.`dMinStock` AS `dMinStock`,`eleproductstock`.`dProductQty` AS `dProductQty`,`eleproductstock`.`sDefineNo3` AS `sDefineNo3`,`eleproductstock`.`sWorkOrderNo` AS `sWorkOrderNo`,`eleproductstock`.`sOrderNo` AS `sOrderNo` from (((((`eleproductstock` join `eleproduct` on((`eleproductstock`.`sProductId` = `eleproduct`.`sId`))) join `elecustomer` on((`eleproductstock`.`sCustomerId` = `elecustomer`.`sId`))) join `siswarehouse` on((`eleproductstock`.`sWarehouseId` = `siswarehouse`.`sId`))) left join `sislocation` on((`eleproductstock`.`sLocationId` = `sislocation`.`sId`))) left join `sisproductclassify` on((`sisproductclassify`.`sId` = `eleproduct`.`sParentId`)))
```

## Narrative

_No human-written narrative yet._
