Last active
December 12, 2015 09:58
-
-
Save eldewall/4755243 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF @TypeId = 0 | |
| BEGIN | |
| SELECT SuggestionId, [Message], [Type] | |
| FROM so_Suggestion main | |
| INNER JOIN so_Suggestion_Model joined ON main.SuggestionId = joined.SuggestionId | |
| WHERE main.[Type] = @TypeId | |
| END | |
| ELSE IF @TypeId = 1 | |
| BEGIN | |
| SELECT SuggestionId, [Message], [Type] | |
| FROM so_Suggestion main | |
| INNER JOIN so_Suggestion_Version joined ON main.SuggestionId = joined.SuggestionId | |
| WHERE main.[Type] = @TypeId | |
| END | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment