CREATE PROCEDURE k_sp_read_microsite @IdMicrosite CHAR(32), @IdApp INTEGER OUTPUT, @NmMicrosite VARCHAR(100) OUTPUT, @Path VARCHAR(254) OUTPUT, @IdWorkArea CHAR(32) OUTPUT AS
  SELECT @IdApp=id_app, @NmMicrosite=nm_microsite, @Path=path_metadata, @IdWorkArea=gu_workarea FROM k_microsites WHERE gu_microsite=@IdMicrosite
GO;

CREATE PROCEDURE k_sp_read_pageset @IdPageSet CHAR(32), @IdMicrosite CHAR(32) OUTPUT, @NmMicrosite VARCHAR(100) OUTPUT, @IdWorkArea CHAR(32) OUTPUT, @NmPageSet NVARCHAR(100) OUTPUT, @VsStamp VARCHAR(16) OUTPUT, @IdLanguage CHAR(2) OUTPUT, @DtModified DATETIME OUTPUT, @PathData VARCHAR(254) OUTPUT, @IdStatus VARCHAR(30) OUTPUT, @PathMetaData VARCHAR(254) OUTPUT, @TxComments NVARCHAR(255) OUTPUT, @GuCompany CHAR(32) OUTPUT, @GuProject CHAR(32) OUTPUT,@TxEmailFrom VARCHAR(254) OUTPUT, @TxEmailReply VARCHAR(254) OUTPUT, @NmFrom NVARCHAR(254) OUTPUT, @TxSubject NVARCHAR(254) OUTPUT AS
  SELECT @NmMicrosite=m.nm_microsite, @IdMicrosite=m.gu_microsite, @IdWorkArea=p.gu_workarea, @NmPageSet=p.nm_pageset, @VsStamp=p.vs_stamp, @IdLanguage=p.id_language, @DtModified=p.dt_modified, @PathData=p.path_data, @IdStatus=p.id_status, @PathMetaData=m.path_metadata, @TxComments=p.tx_comments,@GuCompany=p.gu_company,@GuProject=p.gu_project @TxEmailFrom=p.tx_email_from, @TxEmailReply=p.tx_email_reply, @NmFrom=p.nm_from, @TxSubject=p.tx_subject FROM k_pagesets p LEFT OUTER JOIN k_microsites m ON p.gu_microsite=m.gu_microsite WHERE p.gu_pageset=@IdPageSet
GO;