select categoryId from tbl_BPL_repositoryCategories where categoryDescription = and ownerId = 387 and ownerType = 'BRO' select contentId, docTitle, docId, fileSize, fileExt, uploadDate, sortRank, publishDate, unpublishDate, ownerId from tbl_DOC_Documents where ownerId in ( 387, -387 ) and fsl_tablecode = 'BRO' and docId = select principalId from tbl_BRO_Principals where ownerId = 387 and ownerType = 'BRO' and mfrId = select fileId from tbl_BPL_Repository where contentId = and ownerId = 387 and ownerType = 'BRO' and containerId = and containerType = 'BPL' select * from tbl_FSC_Content where contentId = select * from tbl_FSC_Content where contentId = insert into tbl_BPL_Repository( ownerId, ownerType, containerId, containerType, docTitle, category, contentId, fileSize, fileExt, docDescription, sortRank, restricted, uploadDate, publishDate, unpublishDate ) values ( 387, 'BRO', , 'BPL', , , , , , 'docId = #docId#', , , , , ) update tbl_DOC_Documents set ownerId = -387 where ownerId = 387 and fsl_tablecode = 'BRO' and docId = update tbl_FSC_Content set subFolder = 'BPL' where contentId = and mainfolder = 'BRO387' and subFolder = 'DOC' select * from tbl_BPL_Repository where fileId = and ownerId = 387 and ownerType = 'BRO'