Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exec DWH..create_views 'MRQuestionsWithoutAnswers'
- ----------------------------------------------------------------------------------------
- -- Server dwhru221: Creating standard report
- ----------------------------------------------------------------------------------------
- begin try
- -- begin transaction
- delete from dwhru23.meta.dbo.ReportOnlyTables where tablename = 'MRQuestionsWithoutAnswers'
- delete from dwhru23.meta.dbo.ReportOnlyParams where tablename = 'MRQuestionsWithoutAnswers'
- delete from dwhru23.meta.dbo.ReportOnlyColumns where tablename = 'MRQuestionsWithoutAnswers'
- insert into dwhru23.meta.dbo.ReportOnlyTables(tablename, logicalpartition, accesspolicy,
- defaultaggregate, enablemultiplierparameter, hasdaylevel, hasdetaillevel, project,
- hashostcolumn, logstablename, islistbyenabled, insql, indruid, enabletarget)
- select 'MRQuestionsWithoutAnswers', 1054, 'default', 'Sum', 0, 3, 0, 'OK', 0, 'MRQuestionsWithoutAnswers', 0, 3, 0, 0
- insert into dwhru23.meta.dbo.ReportOnlyColumns (tablename, [column], pos) values ('MRQuestionsWithoutAnswers', 'h3_without_answer', '1')
- insert into dwhru23.meta.dbo.ReportOnlyColumns (tablename, [column], pos) values ('MRQuestionsWithoutAnswers', 'h6_without_answer', '2')
- insert into dwhru23.meta.dbo.ReportOnlyColumns (tablename, [column], pos) values ('MRQuestionsWithoutAnswers', 'h12_without_answer', '3')
- insert into dwhru23.meta.dbo.ReportOnlyColumns (tablename, [column], pos) values ('MRQuestionsWithoutAnswers', 'h24_without_answer', '4')
- insert into dwhru23.meta.dbo.ReportOnlyColumns (tablename, [column], pos) values ('MRQuestionsWithoutAnswers', 'h96_without_answer', '5')
- -- commit
- exec dwhru221.meta.dbo.etl_meta -- sync metadata
- exec dwhru221.[dwh-charts].dbo.etl_standard_reports -- sync metadata
- select * from dwhru221.meta.dbo.ReportOnlyTables where tablename = 'MRQuestionsWithoutAnswers'
- select * from dwhru221.meta.dbo.ReportOnlyParams where tablename = 'MRQuestionsWithoutAnswers'
- select * from dwhru221.meta.dbo.ReportOnlyColumns where tablename = 'MRQuestionsWithoutAnswers'
- end try
- begin catch
- if @@trancount > 0 begin
- rollback transaction
- end
- end catch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement