Last active
August 29, 2015 14:20
-
-
Save dnasca/841539ef00094a38a7b7 to your computer and use it in GitHub Desktop.
Date Range
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
| exec (' SELECT DISTINCT ' | |
| + @SearchField + ' FROM SchemaAudit WHERE StartDate >= ' | |
| + Convert(varchar(20), @DateFrom) | |
| + 'AND WHERE EndDate >= ' | |
| + Convert(varchar(20),@DateTo) | |
| + ' ORDER BY ' | |
| + @SearchField | |
| +' ASC') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment