CREATE VIEW "SBODEMODE"."IBT1" ( "ItemCode", "BatchNum", "WhsCode", "LineNum", "ItemName", "BaseType", "BaseEntry", "BaseNum", "BaseLinNum", "DocDate", "Quantity", "CardCode", "CardName", "Direction", "CreateDate", "BsDocType", "BsDocEntry", "BsDocLine", "DataSource", "UserSign" ) AS SELECT  "ItemCode"  ,"BatchNum"  ,"WhsCode"  ,(			row_number() over (partition by "ItemCode", "BatchNum", "WhsCode" order by "LogEntry") - 1 ) as "LineNum"  ,"ItemName"  ,"BaseType" ,"BaseEntry" ,"BaseNum"  ,"BaseLinNum"  ,"DocDate"  ,"Quantity" ,"CardCode"  ,"CardName"  ,"Direction"  ,"CreateDate"  ,"BsDocType"  ,"BsDocEntry"  ,"BsDocLine"  ,"DataSource"  ,"UserSign" from "SBODEMODE".IBT1_LINK a