Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phamdinhkhanh/sqlcode
https://github.com/phamdinhkhanh/sqlcode
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/phamdinhkhanh/sqlcode
- Owner: phamdinhkhanh
- Created: 2021-10-25T05:03:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-25T06:03:13.000Z (about 3 years ago)
- Last Synced: 2023-11-07T18:59:59.843Z (about 1 year ago)
- Language: TSQL
- Size: 251 KB
- Stars: 151
- Watchers: 5
- Forks: 65
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SQLCode
## Function
* [FunctionConvertDateCrossApply](FunctionConvertDateCrossApply.sql): Convert VARCHAR Date type `DD/MM/YYYY` and return to `YYYY-MM-DD`
* [FunctionReturnDateInMonth](FunctionReturnDateInMonth.sql): Return number of date in month. Input VARCHAR Date type `YYYYMMDD`
* [FunctionReturnTable](FunctionReturnTable.sql): Example function about how to return a table by SQL query command.
* [FunctionReturnTableSegment](FunctionReturnTableSegment.sql): Function create segmentation for customer base on income.
* [FunctionReturnVariable](FunctionReturnVariable.sql): Example function about returning a variable.
* [FunctionReturnWeek](FunctionReturnWeek.sql): Return week in year.## Procedure
* [ProcedureImportCSVFile](ProcedureImportCSVFile.sql): Procedure to import CSV.
* [ProcedureImportTextFile](ProcedureImportTextFile.sql): Procedure to import txt file.
* [ProcedureSelectWorkOrder](ProcedureSelectWorkOrder.sql): Procedure of SELECT query.
* [ExecRcodeFromSQL](ExecRcodeFromSQL.sql): Run R code inside SQL.## Useful Example
* [ImportFromOpenRowSet](ImportFromOpenRowSet.sql): How to use `OPENROWSET` command to load excel file into data base.
* [Index](Index.sql): How to create index for table
* [backup](backup.sql): Backup database.
* [AttachDatabase](AttachDatabase.sql): Attach database.
* [Pivotable](Pivotable.sql): How to create a pivotable in SQL.
* [PartitionTable](PartitionTable.sql): Partition table according time in SQL.
* [SwitchOutDataByPartition](SwitchOutDataByPartition.sql): Switch out data by partition group.
* [Inline&MultipleStatementFunction](Inline&MultipleStatementFunction.sql): Example about Multi-Statement Function.