Kingdee K/3 Fixed Production-related SQL statements
Select * fromVw_fa_card--fixed production printing raw dataSelectFassetid,fassetnumber,fassetname,fgroupname,funit,fnum,flocationname,fguid fromVw_fa_card--serial number, asset code, asset name, category, unit, quantity, usage department, Guid Select * fromVw_assetinvent_facardgroupSelect * fromVw_fa_cardwhereFguid= '261d78be-d938-401a-9243-2a7dac6ba389' SelectFvalue,* fromT_systemprofilewhereFkey= 'Fprintcodeclass' andFcategory= 'FA' --Get Print Barcode setup, barcode or QR code --fixed production printing raw data, organizing versionSELECTFalterid asFdeptname,CONVERT(INT, Fnum) asFprintqty,CONVERT(INT, Fnum) asFnum, Fassetnumber,CONVERT(varchar( -), V.fdate, at) asfdate, Fworkbookid, Fgroupname, Fassetname, Funit, Flocationname, Feconomyusename, Fstatusname, FAlterModeNam E, Fworkcenter=TWC. FName, Fcostcenter=TCC. FName, Fmodel, Fproductingarea, Fvender, Fmanufacturer , V.fassetid, Forgval,Convert(int, Flifeperiods) asFlifeperiods,CONVERT(varchar( -), V.fbeginusedate, at) asfbeginusedate, Fexplanation, (SELECTFvalue fromT_systemprofileWHEREFkey= 'CompanyName' ) asFaccountname fromVw_fa_card V Left JOINT_workcenter TWC onTwc. Fitemid=V.fworkcenterid Left JOINT_base_costcenter TCC onTcc. Fitemid=V.fcostcenterid Left JOIN ( SELECTFassetid,COUNT(1) asFdetailnum fromT_facarddetailWHEREFstate= 1 GROUP byFassetid) TFC onV.fassetid=TFC. FassetidINNER JOIN ( SELECTFassetid,MAX(fdate) asFDate fromVw_fa_cardGROUP byfassetid) T2 onV.fassetid=T2. Fassetid andV.fdate=t2.fdateWHEREFworkbookid= ' on' andFnum!= 0ORDER byFassetnumberSelectT1.*, T2. Fname_chs,t2. Fname_cht,t2. Fname_en from(SELECTFprojectid,fentryid,fbarcodekey,fkey,fkey asFfieldname,fctltype,fbarcodename,ftablename,flisttablealias,flistcolname,fmustfield,freltablename, Frelprimaryfield,freldisplayfield fromicbarcodefieldmappingWHEREFprojectid= -) T1 Left JoinT_assetbarcodefields T2 onT1. Fkey=T2. FkeywhereT2. Fbarcodeclass= 'Two-dimensional code' ORDER byFentryidSELECT [Fprojectid],[Fprojectname],[Fuserid],[Fclasstypeid],[Fissystem],[Fdelete],[Flogo],[Fshowtext] fromIcbarcodeprojectWHEREFdelete=0 andFprojectid=20 andFbarcodeclass= 'Two-dimensional code'Select * fromT_assetbarcodefieldswhereFmustfield=0 andFbarcodeclass= 'Two-dimensional code' andFname_chs not inch('Serial Number','Separators','Barcode Rules') andFkey<>'Fruleassetnumber'SelectT1.*, T2. Fname_chs,t2. Fname_cht,t2. Fname_en from(SELECTFprojectid,fentryid,fbarcodekey,fkey,fkey asFfieldname,fctltype,fbarcodename,ftablename,flisttablealias,flistcolname,fmustfield,freltablename, Frelprimaryfield,freldisplayfield fromicbarcodefieldmappingWHEREFprojectid= -) T1 Left JoinT_assetbarcodefields T2 onT1. Fkey=T2. FkeywhereT2. Fbarcodeclass= 'Two-dimensional code' ORDER byFentryid
Kingdee K/3 Fixed Production-related SQL statements