Skip to Content

Query para obtener plantilla para subir artículos por DTW

select ItemCode,ItemName,FrgnName,ItmsGrpCod,CstGrpCode,–VatGourpSa,CodeBars,

case VATLiable when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘VATLiable’,

case PrchseItem when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘PrchseItem’,

case SellItem when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘SellItem’,

case InvntItem when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘InvntItem’,–IncomeAcct,ExmptIncom,ExpensAcct,CardCode,

SuppCatNum,ReorderQty,MinLevel,–PicturName,UserText,SerialNum,

CommisPcnt,CommisSum,CommisGrp,

case TreeType when ‘N’then ‘iNotATree’ when ‘A’then ‘iAssemblyTree’ when ‘S’then ‘iSalesTree’ when ‘P’then ‘iProductionTree’ when ‘T’then ‘iTemplateTree’ when ‘I’then ‘iIngredient’end ‘TreeType’,

case AssetItem when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘AssetItem’,–ExportCode,

FirmCode,–validTo,ValidComm,

case ManSerNum when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘ManSerNum’,

case ManBtchNum when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘ManBtchNum’,

case validFor when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘validFor’,

case frozenFor when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘frozenFor’,–frozenFrom,frozenTo,FrozenComm,SalUnitMsr,

NumInSale,–SalPackMsr,

SalPackUn,SLength1,–SLen1Unit,

SWidth1,–SWdth1Unit,

SHeight1,–SHght1Unit,

SVolume,SVolUnit,SWeight1,–SWght1Unit,BuyUnitMsr,

NumInBuy,–PurPackMsr,

PurPackUn,BLength1,–BLen1Unit,

BWidth1,–BWdth1Unit,

BHeight1,–BHght1Unit,

BVolume,BVolUnit,BWeight1,–BWght1Unit,VatGroupPu,

SalFactor1,PurFactor1,–FrgnInAcct,ECInAcct,FrgnExpAcc,ECExpAcc,

AvgPrice,ISNULL(DfltWH,”) ‘DfltWH’,–DfltWH,ShipType,

case GLMethod when ‘W’then ‘glm_WH’ when ‘C’then ‘glm_ItemClass’ when ‘L’then ‘glm_ItemLevel’ end ‘GLMethod’,

case TaxType when ‘Y’then ‘tt_Yes’ when ‘N’then ‘tt_No’ when ‘U’then ‘tt_UseTax’ end ‘TaxType’,MaxLevel,

case ByWh when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘ByWh’,–BHght2Unit,

BHeight2,–BLen2Unit,

Blength2,–BWght2Unit,

BWeight2,–BWdth2Unit,

BWidth2,–SHght2Unit,

SHeight2,–SLen2Unit,

Slength2,–SWght2Unit,

SWeight2,–SWdth2Unit,

SWidth2,

case BlockOut when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘BlockOut’,

case ManOutOnly when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘ManOutOnly’,

case WTLiable when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘WTLiable’,

case EvalSystem when ‘A’then ‘bis_MovingAverage’ when ‘S’then ‘bis_Standard’ when ‘F’ then ‘bis_FIFO’ end ‘EvalSystem’,–SWW,WarrntTmpl,IndirctTax,

case IndirctTax when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘IndirctTax’,TaxCodeAR,TaxCodeAP,–BaseUnit,CountryOrg,–IssueMthd,MngMethod,Phantom,–InvntryUom,

case IssueMthd when ‘B’then ‘im_Backflush’ when ‘M’then ‘im_Manual’ end ‘IssueMthd’,

case MngMethod when ‘A’then ‘bomm_OnEveryTransaction’ when ‘R’then ‘bomm_OnRealeaseOnly’ end ‘MngMethod’,

case Phantom when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘Phantom’,–PlaningSys,PrcrmntMtd

case PlaningSys when ‘M’then ‘bop_MRP’ when ‘N’then ‘bop_None’ end ‘PlaningSys’,

case PrcrmntMtd when ‘M’then ‘bom_Make’ when ‘B’then ‘bom_Buy’ end ‘PrcrmntMtd’,–OrdrIntrvl,

OrdrMulti,–LeadTime,

MinOrdrQty,–ItemType,

case ItemType when ‘I’then ‘itItems’ when ‘L’then ‘itLabor’ when ‘T’ then ‘itTravel’ end ‘ItemType’,

ItemClass,OSvcCode,ISvcCode,ServiceGrp,NCMCode,MatType,MatGrp,ProductSrc,

case QryGroup1 when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘QryGroup1’,

case ManOutOnly when ‘Y’then ‘tYES’ when ‘N’then ‘tNO’ end ‘ManOutOnly’,DNFEntry,–Spec,TaxCtg,

ISNULL(U_BPP_TIPEXIST,”) ‘U_BPP_TIPEXIST’,ISNULL(U_BPP_TIPUNMED,”) ‘U_BPP_TIPUNMED’,

ISNULL(U_SYP_FARE,”) ‘U_SYP_FARE’,ISNULL(U_SYP_TISE,”) ‘U_SYP_TISE’,

ISNULL(U_SYP_TIUS,”) ‘U_SYP_TIUS’,ISNULL(U_SYP_GRU1,”) ‘U_SYP_GRU1’,

ISNULL(U_SYP_GRU2,”) ‘U_SYP_GRU2’,ISNULL(U_SYP_CONCEPTO,”) ‘U_SYP_CONCEPTO’,

ISNULL(U_TRANS_ASOC,”) ‘U_TRANS_ASOC’ from oitm

Be the first to leave a comment
You must be Logged on to comment or reply to a post.