# `viw_agvinstruct` (view)


- **Updatable:** YES

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `iIncrement` | `int` | NO |
| 2 | `sId` | `varchar(255)` | YES |
| 3 | `sBillNo` | `varchar(255)` | YES |
| 4 | `iOrder` | `int` | YES |
| 5 | `sFormId` | `varchar(255)` | YES |
| 6 | `sBrandsId` | `varchar(255)` | YES |
| 7 | `sSubsidiaryId` | `varchar(255)` | YES |
| 8 | `tCheckDate` | `datetime` | YES |
| 9 | `sCheckPerson` | `varchar(255)` | YES |
| 10 | `bCheck` | `bit(1)` | YES |
| 11 | `sStatus` | `varchar(255)` | YES |
| 12 | `bInvalid` | `bit(1)` | YES |
| 13 | `sMemo` | `text` | YES |
| 14 | `sSlaveId` | `varchar(255)` | YES |
| 15 | `sParentId` | `varchar(255)` | YES |
| 16 | `sMakePerson` | `varchar(255)` | YES |
| 17 | `iFlow` | `int` | YES |
| 18 | `iType` | `int` | YES |
| 19 | `tCreateDate` | `datetime` | YES |
| 20 | `sSrcId` | `varchar(255)` | YES |
| 21 | `sSrcSlaveId` | `varchar(255)` | YES |
| 22 | `sCustomerId` | `varchar(255)` | YES |
| 23 | `sCustomerNo` | `varchar(255)` | YES |
| 24 | `sCustomerName` | `varchar(255)` | YES |
| 25 | `sProductId` | `varchar(255)` | YES |
| 26 | `sProductNo` | `varchar(255)` | YES |
| 27 | `sProductName` | `varchar(255)` | YES |
| 28 | `sWorkOrderId` | `varchar(255)` | YES |
| 29 | `sWorkOrderNo` | `varchar(255)` | YES |
| 30 | `sWorkOrderSlaveId` | `varchar(255)` | YES |
| 31 | `sWorkOrderControlId` | `varchar(255)` | YES |
| 32 | `sWorkOrderMaterialsTbId` | `varchar(255)` | YES |
| 33 | `sWorkOrderProcessTbId` | `varchar(255)` | YES |
| 34 | `sPartsName` | `varchar(255)` | YES |
| 35 | `sFaceName` | `varchar(255)` | YES |
| 36 | `sDecomposeCustomize` | `varchar(255)` | YES |
| 37 | `sProcessId` | `varchar(255)` | YES |
| 38 | `sProcessNo` | `varchar(255)` | YES |
| 39 | `sProcessName` | `varchar(255)` | YES |
| 40 | `sMaterialsId` | `varchar(255)` | YES |
| 41 | `sMaterialsName` | `varchar(255)` | YES |
| 42 | `sMaterialsStyle` | `varchar(255)` | YES |
| 43 | `sDefineNo` | `varchar(255)` | YES |
| 44 | `dAuxiliaryQty` | `decimal(18,6)` | YES |
| 45 | `dMaterialsQty` | `decimal(18,6)` | YES |
| 46 | `dAuxiliaryToQty` | `decimal(18,6)` | YES |
| 47 | `dMaterialsToQty` | `decimal(18,6)` | YES |
| 48 | `sMachineId` | `varchar(255)` | YES |
| 49 | `sMachineNo` | `varchar(255)` | YES |
| 50 | `sMachineName` | `varchar(255)` | YES |
| 51 | `sWbCode` | `varchar(255)` | YES |
| 52 | `sAreaNo` | `varchar(255)` | YES |
| 53 | `sPalletNo` | `varchar(255)` | YES |
| 54 | `sPositionNo` | `varchar(255)` | YES |
| 55 | `sInState` | `varchar(255)` | YES |
| 56 | `sOutState` | `varchar(255)` | YES |
| 57 | `sUnState` | `varchar(255)` | YES |
| 58 | `sCode` | `varchar(255)` | YES |
| 59 | `sTaskCode` | `varchar(255)` | YES |
| 60 | `iGrade` | `int` | YES |
| 61 | `sSource` | `varchar(255)` | YES |
| 62 | `bInExecute` | `bit(1)` | YES |
| 63 | `tInExecute` | `datetime` | YES |
| 64 | `bOutExecute` | `bit(1)` | YES |
| 65 | `tOutExecute` | `datetime` | YES |
| 66 | `bUnExecute` | `bit(1)` | YES |
| 67 | `tUnExecute` | `datetime` | YES |
| 68 | `sInCode` | `varchar(255)` | YES |
| 69 | `sInStatus` | `varchar(255)` | YES |
| 70 | `sInTaskCode` | `varchar(255)` | YES |
| 71 | `sInMessage` | `varchar(255)` | YES |
| 72 | `sInReMark` | `varchar(255)` | YES |
| 73 | `sInResBody` | `longtext` | YES |
| 74 | `sOutCode` | `varchar(255)` | YES |
| 75 | `sOutStatus` | `varchar(255)` | YES |
| 76 | `sOutTaskCode` | `varchar(255)` | YES |
| 77 | `sOutMessage` | `varchar(255)` | YES |
| 78 | `sOutReMark` | `varchar(255)` | YES |
| 79 | `sOutResBody` | `longtext` | YES |
| 80 | `sUnCode` | `varchar(255)` | YES |
| 81 | `sUnStatus` | `varchar(255)` | YES |
| 82 | `sUnTaskCode` | `varchar(255)` | YES |
| 83 | `sUnMessage` | `varchar(255)` | YES |
| 84 | `sUnReMark` | `varchar(255)` | YES |
| 85 | `bPalletComplete` | `bit(1)` | YES |
| 86 | `sUnResBody` | `longtext` | YES |
| 87 | `sReAreaNo` | `varchar(255)` | YES |
| 88 | `bGoBack` | `bit(1)` | YES |
| 89 | `sType` | `varchar(255)` | YES |
| 90 | `bInReturn` | `bit(1)` | YES |
| 91 | `bOutReturn` | `bit(1)` | YES |
| 92 | `sInOFFState` | `varchar(255)` | YES |
| 93 | `sInOFFStatePerson` | `varchar(255)` | YES |
| 94 | `sInOFFStateDate` | `datetime` | YES |
| 95 | `sOutOFFState` | `varchar(255)` | YES |
| 96 | `sOutStatePerson` | `varchar(255)` | YES |
| 97 | `sOutOFFStateDate` | `datetime` | YES |
| 98 | `bInOFFExecute` | `bit(1)` | YES |
| 99 | `tInOFFExucute` | `datetime` | YES |
| 100 | `bOutOFFExecute` | `bit(1)` | YES |
| 101 | `tOutOFFExecute` | `datetime` | YES |
| 102 | `sInOFFCode` | `varchar(255)` | YES |
| 103 | `sInOFFStatus` | `varchar(255)` | YES |
| 104 | `sInOFFTaskCode` | `varchar(255)` | YES |
| 105 | `sInOFFMessage` | `varchar(255)` | YES |
| 106 | `sInOFFReMark` | `varchar(255)` | YES |
| 107 | `sInOFFResBody` | `longtext` | YES |
| 108 | `sOutOFFCode` | `varchar(255)` | YES |
| 109 | `sOutOFFStatus` | `varchar(255)` | YES |
| 110 | `sOutOFFTaskCode` | `varchar(255)` | YES |
| 111 | `sOutOFFMessage` | `varchar(255)` | YES |
| 112 | `sOutOFFReMark` | `varchar(255)` | YES |
| 113 | `sOutOFFResBody` | `longtext` | YES |
| 114 | `sOutAreaNo` | `varchar(255)` | YES |
| 115 | `sInMent` | `varchar(3)` | NO |
| 116 | `sOutMent` | `varchar(3)` | NO |
| 117 | `sUnMent` | `varchar(3)` | NO |

## Definition

```sql
select `agvinstructmaster`.`iIncrement` AS `iIncrement`,`agvinstructmaster`.`sId` AS `sId`,`agvinstructmaster`.`sBillNo` AS `sBillNo`,`agvinstructmaster`.`iOrder` AS `iOrder`,`agvinstructmaster`.`sFormId` AS `sFormId`,`agvinstructmaster`.`sBrandsId` AS `sBrandsId`,`agvinstructmaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`agvinstructmaster`.`tCheckDate` AS `tCheckDate`,`agvinstructmaster`.`sCheckPerson` AS `sCheckPerson`,`agvinstructmaster`.`bCheck` AS `bCheck`,`agvinstructmaster`.`sStatus` AS `sStatus`,`agvinstructmaster`.`bInvalid` AS `bInvalid`,`agvinstructmaster`.`sMemo` AS `sMemo`,`agvinstructslave`.`sId` AS `sSlaveId`,`agvinstructslave`.`sParentId` AS `sParentId`,`agvinstructslave`.`sMakePerson` AS `sMakePerson`,`agvinstructslave`.`iFlow` AS `iFlow`,`agvinstructslave`.`iType` AS `iType`,`agvinstructslave`.`tCreateDate` AS `tCreateDate`,`agvinstructslave`.`sSrcId` AS `sSrcId`,`agvinstructslave`.`sSrcSlaveId` AS `sSrcSlaveId`,`agvinstructslave`.`sCustomerId` AS `sCustomerId`,`agvinstructslave`.`sCustomerNo` AS `sCustomerNo`,`agvinstructslave`.`sCustomerName` AS `sCustomerName`,`agvinstructslave`.`sProductId` AS `sProductId`,`agvinstructslave`.`sProductNo` AS `sProductNo`,`agvinstructslave`.`sProductName` AS `sProductName`,`agvinstructslave`.`sWorkOrderId` AS `sWorkOrderId`,`agvinstructslave`.`sWorkOrderNo` AS `sWorkOrderNo`,`agvinstructslave`.`sWorkOrderSlaveId` AS `sWorkOrderSlaveId`,`agvinstructslave`.`sWorkOrderControlId` AS `sWorkOrderControlId`,`agvinstructslave`.`sWorkOrderMaterialsTbId` AS `sWorkOrderMaterialsTbId`,`agvinstructslave`.`sWorkOrderProcessTbId` AS `sWorkOrderProcessTbId`,`agvinstructslave`.`sPartsName` AS `sPartsName`,`agvinstructslave`.`sFaceName` AS `sFaceName`,`agvinstructslave`.`sDecomposeCustomize` AS `sDecomposeCustomize`,`agvinstructslave`.`sProcessId` AS `sProcessId`,`agvinstructslave`.`sProcessNo` AS `sProcessNo`,`agvinstructslave`.`sProcessName` AS `sProcessName`,`agvinstructslave`.`sMaterialsId` AS `sMaterialsId`,`agvinstructslave`.`sMaterialsName` AS `sMaterialsName`,`agvinstructslave`.`sMaterialsStyle` AS `sMaterialsStyle`,`agvinstructslave`.`sDefineNo` AS `sDefineNo`,`agvinstructslave`.`dAuxiliaryQty` AS `dAuxiliaryQty`,`agvinstructslave`.`dMaterialsQty` AS `dMaterialsQty`,`agvinstructslave`.`dAuxiliaryToQty` AS `dAuxiliaryToQty`,`agvinstructslave`.`dMaterialsToQty` AS `dMaterialsToQty`,`agvinstructslave`.`sMachineId` AS `sMachineId`,`agvinstructslave`.`sMachineNo` AS `sMachineNo`,`agvinstructslave`.`sMachineName` AS `sMachineName`,`agvinstructslave`.`sWbCode` AS `sWbCode`,`agvinstructslave`.`sAreaNo` AS `sAreaNo`,`agvinstructslave`.`sPalletNo` AS `sPalletNo`,`agvinstructslave`.`sPositionNo` AS `sPositionNo`,`agvinstructslave`.`sInState` AS `sInState`,`agvinstructslave`.`sOutState` AS `sOutState`,`agvinstructslave`.`sUnState` AS `sUnState`,`agvinstructslave`.`sCode` AS `sCode`,`agvinstructslave`.`sTaskCode` AS `sTaskCode`,`agvinstructslave`.`iGrade` AS `iGrade`,`agvinstructslave`.`sSource` AS `sSource`,`agvinstructslave`.`bInExecute` AS `bInExecute`,`agvinstructslave`.`tInExecute` AS `tInExecute`,`agvinstructslave`.`bOutExecute` AS `bOutExecute`,`agvinstructslave`.`tOutExecute` AS `tOutExecute`,`agvinstructslave`.`bUnExecute` AS `bUnExecute`,`agvinstructslave`.`tUnExecute` AS `tUnExecute`,`agvinstructslave`.`sInCode` AS `sInCode`,`agvinstructslave`.`sInStatus` AS `sInStatus`,`agvinstructslave`.`sInTaskCode` AS `sInTaskCode`,`agvinstructslave`.`sInMessage` AS `sInMessage`,`agvinstructslave`.`sInReMark` AS `sInReMark`,`agvinstructslave`.`sInResBody` AS `sInResBody`,`agvinstructslave`.`sOutCode` AS `sOutCode`,`agvinstructslave`.`sOutStatus` AS `sOutStatus`,`agvinstructslave`.`sOutTaskCode` AS `sOutTaskCode`,`agvinstructslave`.`sOutMessage` AS `sOutMessage`,`agvinstructslave`.`sOutReMark` AS `sOutReMark`,`agvinstructslave`.`sOutResBody` AS `sOutResBody`,`agvinstructslave`.`sUnCode` AS `sUnCode`,`agvinstructslave`.`sUnStatus` AS `sUnStatus`,`agvinstructslave`.`sUnTaskCode` AS `sUnTaskCode`,`agvinstructslave`.`sUnMessage` AS `sUnMessage`,`agvinstructslave`.`sUnReMark` AS `sUnReMark`,`agvinstructslave`.`bPalletComplete` AS `bPalletComplete`,`agvinstructslave`.`sUnResBody` AS `sUnResBody`,`agvinstructslave`.`sReAreaNo` AS `sReAreaNo`,`agvinstructslave`.`bGoBack` AS `bGoBack`,`agvinstructslave`.`sType` AS `sType`,`agvinstructslave`.`bInReturn` AS `bInReturn`,`agvinstructslave`.`bOutReturn` AS `bOutReturn`,`agvinstructslave`.`sInOFFState` AS `sInOFFState`,`agvinstructslave`.`sInOFFStatePerson` AS `sInOFFStatePerson`,`agvinstructslave`.`sInOFFStateDate` AS `sInOFFStateDate`,`agvinstructslave`.`sOutOFFState` AS `sOutOFFState`,`agvinstructslave`.`sOutStatePerson` AS `sOutStatePerson`,`agvinstructslave`.`sOutOFFStateDate` AS `sOutOFFStateDate`,`agvinstructslave`.`bInOFFExecute` AS `bInOFFExecute`,`agvinstructslave`.`tInOFFExucute` AS `tInOFFExucute`,`agvinstructslave`.`bOutOFFExecute` AS `bOutOFFExecute`,`agvinstructslave`.`tOutOFFExecute` AS `tOutOFFExecute`,`agvinstructslave`.`sInOFFCode` AS `sInOFFCode`,`agvinstructslave`.`sInOFFStatus` AS `sInOFFStatus`,`agvinstructslave`.`sInOFFTaskCode` AS `sInOFFTaskCode`,`agvinstructslave`.`sInOFFMessage` AS `sInOFFMessage`,`agvinstructslave`.`sInOFFReMark` AS `sInOFFReMark`,`agvinstructslave`.`sInOFFResBody` AS `sInOFFResBody`,`agvinstructslave`.`sOutOFFCode` AS `sOutOFFCode`,`agvinstructslave`.`sOutOFFStatus` AS `sOutOFFStatus`,`agvinstructslave`.`sOutOFFTaskCode` AS `sOutOFFTaskCode`,`agvinstructslave`.`sOutOFFMessage` AS `sOutOFFMessage`,`agvinstructslave`.`sOutOFFReMark` AS `sOutOFFReMark`,`agvinstructslave`.`sOutOFFResBody` AS `sOutOFFResBody`,`agvinstructslave`.`sOutAreaNo` AS `sOutAreaNo`,(case when (`agvinstructslave`.`bInExecute` = 1) then (case when (`agvinstructslave`.`sInCode` <> '0') then 'OFF' else 'ON' end) else 'ON' end) AS `sInMent`,(case when (`agvinstructslave`.`bOutExecute` = 1) then (case when (`agvinstructslave`.`sInCode` <> '0') then 'OFF' else 'ON' end) else 'ON' end) AS `sOutMent`,(case when (`agvinstructslave`.`bUnExecute` = 1) then (case when (`agvinstructslave`.`sInCode` <> '0') then 'OFF' else 'ON' end) else 'ON' end) AS `sUnMent` from (`agvinstructmaster` join `agvinstructslave` on((`agvinstructmaster`.`sId` = `agvinstructslave`.`sParentId`)))
```

## Narrative

_No human-written narrative yet._
