Number of "identifiers per line"
SQL with 4 identifiers per line
SELECT col1 , col2 , col3 , col4 ,
col5 , col6 , col7 , tablecolumn8 ,
tablecolumn9 , tablecolumn10 , tablecolumn11 , tablecolumn12 ,
tablecolumn13 , tablecolumn14 , tablecolumn15 , tablecolumn16 ,
tablecolumn17 , tablecolumn18 , tablecolumn19 , tablecolumn20 ,
tablecolumn21 , tablecolumn22 , tablecolumn23 , tablecolumn24 ,
tablecolumn25 , tablecolumn26 , tablecolumn27 , tablecolumn28 ,
tablecolumn29 , tablecolumn30
FROM foo
Same SQL with 1 identifier per line
SELECT col1 ,
col2 ,
col3 ,
col4 ,
col5 ,
col6 ,
col7 ,
tablecolumn8 ,
tablecolumn9 ,
tablecolumn10 ,
tablecolumn11 ,
tablecolumn12 ,
tablecolumn13 ,
tablecolumn14 ,
tablecolumn15 ,
tablecolumn16 ,
tablecolumn17 ,
tablecolumn18 ,
tablecolumn19 ,
tablecolumn20 ,
tablecolumn21 ,
tablecolumn22 ,
tablecolumn23 ,
tablecolumn24 ,
tablecolumn25 ,
tablecolumn26 ,
tablecolumn27 ,
tablecolumn28 ,
tablecolumn29 ,
tablecolumn30
FROM foo
Edited 2 time(s). Last edit at 03/30/2009 03:31PM by guidomarcel.
SELECT
PT.TaskID, PT.TaskName, ISNULL(T.TT,'') , ISNULL(PT.TTID,0) , ISNULL(S.STTID,'') , ISNULL(PT.STTIDD,0) , ISNULL(A.ActivityType,''), PT.Description, PT.IA, PT.IP, PT.PRJ, P.ProjectCode AS ProjectName, --ISNULL(PSP.SubProjectName, '') AS SubProjectName, --ISNULL(PM.ModuleName, '') AS ModuleName, ISNULL(PT.ActivityTypeID, 0), PT.EstimatedHours, 0 AS 0, CONVERT(VARCHAR,PT.StartDate, 106), CONVERT(VARCHAR,PT.EndDate, 106) , ISNULL(PT.IsForGroup, 0), PT.TeamLeads AS TeamLeads, PT.Comments as Comments, PT.CreateDate as CreateDate, ISNULL((SELECT Count(Distinct(EmployeeID)) FROM PTA WHERE TaskID = PT.TaskID AND ProjectID = PT.ProjectID), 0) AS |