Skip to content

Commit

Permalink
Merge pull request #29 from valadas/issue-28
Browse files Browse the repository at this point in the history
Fixed deprecated sql syntax
  • Loading branch information
valadas authored Apr 27, 2019
2 parents d444898 + 62dc2ad commit ddcd775
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ select SurveyID,
Question,
ViewOrder,
OptionType,
'CreatedByUser' = {objectQualifier}Users.FirstName + ' ' + {objectQualifier}Users.LastName,
{objectQualifier}Users.FirstName + ' ' + {objectQualifier}Users.LastName AS CreatedByUser,
CreatedDate,
'Votes' = ( select sum(Votes) from {objectQualifier}SurveyOptions where {objectQualifier}SurveyOptions.SurveyID = {objectQualifier}Surveys.SurveyID )
( select sum(Votes) from {objectQualifier}SurveyOptions where {objectQualifier}SurveyOptions.SurveyID = {objectQualifier}Surveys.SurveyID ) AS Votes
from {objectQualifier}Surveys
left outer join {objectQualifier}Users on {objectQualifier}Surveys.CreatedByUser = {objectQualifier}Users.UserID
where SurveyID = @SurveyID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ SELECT
S.OptionType,
S.CreatedByUser,
S.CreatedDate,
'Votes' = ( SELECT sum(Votes) FROM {databaseOwner}{objectQualifier}SurveyOptions SO WHERE SO.SurveyID = S.SurveyID )
( SELECT sum(Votes) FROM {databaseOwner}{objectQualifier}SurveyOptions SO WHERE SO.SurveyID = S.SurveyID ) AS Votes
FROM {databaseOwner}{objectQualifier}Surveys S
WHERE SurveyID = @SurveyID
AND ModuleID = @ModuleID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ select
S.OptionType,
S.CreatedByUser,
S.CreatedDate,
'Votes' = ( select sum(Votes) from {databaseOwner}{objectQualifier}SurveyOptions SO where SO.SurveyID = S.SurveyID )
( select sum(Votes) from {databaseOwner}{objectQualifier}SurveyOptions SO where SO.SurveyID = S.SurveyID ) AS Votes
from {databaseOwner}{objectQualifier}Surveys S
where SurveyID = @SurveyID
and ModuleID = @ModuleID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ WHERE
(S.ModuleID = @ModuleID)
)

GO

/************************************************************/
/***** SqlDataProvider *****/
/************************************************************/
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ BEGIN
*/
0 AS ChartType,
CreatedDate,
CreatedByUser
CreatedByUserID
FROM
{databaseOwner}{objectQualifier}Surveys
WHERE
Expand Down

0 comments on commit ddcd775

Please sign in to comment.