{"id":15002832,"url":"https://github.com/chadbaldwin/sql","last_synced_at":"2026-02-19T12:02:12.642Z","repository":{"id":133322595,"uuid":"187925340","full_name":"chadbaldwin/SQL","owner":"chadbaldwin","description":"Various SQL stuff I'm working on...tools, scripts, etc","archived":false,"fork":false,"pushed_at":"2026-02-18T02:31:17.000Z","size":423,"stargazers_count":19,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-18T07:19:15.383Z","etag":null,"topics":["ms-sql","ms-sql-server","ms-sqlserver","mssql","mssqlserver","sql","sql-query","sql-server","sqlserver","stored-procedure","stored-procedures","storedprocedure"],"latest_commit_sha":null,"homepage":"","language":"TSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chadbaldwin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-05-21T22:57:09.000Z","updated_at":"2026-02-18T02:31:20.000Z","dependencies_parsed_at":"2023-11-27T21:27:10.217Z","dependency_job_id":"b836d94e-ac9a-477b-879c-bdd7482f18e9","html_url":"https://github.com/chadbaldwin/SQL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chadbaldwin/SQL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FSQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FSQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FSQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FSQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chadbaldwin","download_url":"https://codeload.github.com/chadbaldwin/SQL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FSQL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29612509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ms-sql","ms-sql-server","ms-sqlserver","mssql","mssqlserver","sql","sql-query","sql-server","sqlserver","stored-procedure","stored-procedures","storedprocedure"],"created_at":"2024-09-24T18:53:01.607Z","updated_at":"2026-02-19T12:02:12.619Z","avatar_url":"https://github.com/chadbaldwin.png","language":"TSQL","readme":"# SQL\nVarious SQL stuff I'm working on...tools, scripts, etc\n\n- **dbo.uf_DateCalc.UserDefinedFunction.sql** - Returns common date ranges based on today or a supplied seed date. Useful for reporting.\n\t- You can either use this as a view by not supplying a DateCode parameter and getting a list of all possible ranges. I like to use this for things like populating drop downs in SSRS.\n\t- Or you can supply a specific DateCode to only get a single record back. I like to use this in procs as an easy to read way of indicating the time range for that proc. It just makes for more readable code.\n\n- **dbo.uf_DateRange.UserDefinedFunction.sql**\n\n- **dbo.usp_SchemaSearch.StoredProcedure.sql**\n\t- A few of the features include...\n\t\t- Multiple search criteria (`@Search`, `@ANDSearch`, `@ANDSearch2`)\n\t\t\t- (AND joins only)...search \"this\" AND \"that\"\n\t\t- Partial and exact match option (`@WholeOnly`)\n\t\t\t- If `@WholeOnly` = true, similar to \"match whole word\", applies to all search parameters\n\t\t- Searches all object types...triggers, functions, procs, views, etc\n\t\t- Output the physical file path of the item (`@BaseFilePath`)\n\t\t\t- This makes it easy to quickly open the actual file\n\t\t\t- Example CTRL+C, CTRL+O, CTRL+V, Enter...I have a keyboard macro set up for it\n\t\t\t- As of now...it only supports one convention for file paths and names, which is the one I use...I hope eventually, I can add some functionality to make that configurable.\n\t\t- 2nd level of depth (`@FindReferences`)\n\t\t\t- Ability to find all the references to your search results\n\t\t\t- Example...you search for a keyword, the proc will return all procs that contain that keyword. You can then go one level deeper and enable @FindReferences, this will find all objects that reference those objects.\n\t\t\t\t- Limitations - only finds references for stored procedure results, and it only searches other stored procedures and job steps\n\t\t- Result caching (`@CacheObjects`, `@CacheOutputSchema`)\n\t\t\t- Many times if you are using this heavily to trace a large process, you may not want to hit every database to grab every object every time you run this proc. So there is an option to cache all objects into a temp table. This way each run, only the temp table is searched. You can also query the temp table manually for more complex searches of your own.\n\t\t- DB filter lists (`@DBName`, `@DBIncludeFilterList`, `@DBExcludeFilterList`)\n\t\t\t- The ability to provide both and inclusion and exclusion list of database name filters (using LIKE syntax, comma delimited)\n\t\t\t- For example...if you want to exclude all databases with '%test%,%backup%'. That will exclude all databases that have \"test\" or \"backup\" in the name\n\t\t\t- `@DBName` - included for simplicity / legacy but will likely be removed eventually. It's an exact match parameter. Filters the proc to only look at the one database, and is an exact match.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchadbaldwin%2Fsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchadbaldwin%2Fsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchadbaldwin%2Fsql/lists"}