Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/phamdinhkhanh/sqlcode


https://github.com/phamdinhkhanh/sqlcode

Last synced: 18 days ago
JSON representation

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.