Skip to content

Commit

Permalink
Add all the codes
Browse files Browse the repository at this point in the history
  • Loading branch information
deeja committed May 28, 2015
1 parent b85b830 commit ea281c0
Show file tree
Hide file tree
Showing 15 changed files with 1,230 additions and 0 deletions.
197 changes: 197 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/

# Visual Studo 2015 cache/options directory
.vs/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt
sitecore_packages/
25 changes: 25 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SQL to CSV tool for MSSQL
### When SQL Server Management Studio (SSMS) is not enough
This is a simple program that fulfils specific requirements

- You need a CSV created from a SQL query

Very simple to use. Just start it up and enter in the connection string, query and the output file name for the CSV.

### Tech / 3rd Party Stuff
* [CSV Helper](https://www.nuget.org/packages/CsvHelper/) - An awesome CSV handling library


## Why I built this / Issues with exporting from SMSS
**The issue is the delimitation**. If a data cell contains a comma and line break, then the export tool kind of ignores it by default.

There [is a setting inside of SSMS](http://stackoverflow.com/a/19639406/59532) that supposedly fixes this, but it still has issues. The line breaks can still leave broken unusable CSV records.

### Todo's

- Command line version
- Support MySQL and other abitrary SQL solutions
- Save state / Remember settings

### Versions
* v1 - Initial release with basic functionality of querying against a database, which is saved to a file. Simples.
22 changes: 22 additions & 0 deletions SqlToCsv.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlToCsv", "SqlToCsv\SqlToCsv.csproj", "{40DB63D3-9E89-4E01-82F3-2AA3BF44E356}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{40DB63D3-9E89-4E01-82F3-2AA3BF44E356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40DB63D3-9E89-4E01-82F3-2AA3BF44E356}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40DB63D3-9E89-4E01-82F3-2AA3BF44E356}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40DB63D3-9E89-4E01-82F3-2AA3BF44E356}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions SqlToCsv/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
Loading

0 comments on commit ea281c0

Please sign in to comment.