sql - Splitting a Complex query into individual Query for Readability -
i have single complex query of 1000 lines want modify .its hard understand query.so there tool or command sql split sql query based on tables involved in query.
for example:a query involving 2 tables split 2 queries of single tables:
select t1.c1, t2.c1,t2,c2 table1 t1 join table2 t2; into
1) select t1.c1 table1 t1; 2) select t2.c1, t2.c2 table2 t2; similarly have 75 tables joined in single query,which needs split 75 single lines of select statement.
sql server : try cte table expression clause or create view per table or set of tables think fit. so, keeping in mind should same output in original query.
Comments
Post a Comment