Export data in any way with IntelliJ-based IDEs


(Adavidoaiei Dumitru-Cornel) #1

https://blog.jetbrains.com/datagrip/2017/11/08/export-data-in-any-way-with-intellij-based-ides/


(Cosmin Popescu) #2

Iarna trecuta am facut un mic script in Powershell pt export in csv :slight_smile:

Set-ExecutionPolicy Unrestricted -Scope CurrentUser
Import-Module SqlServer

$server = "server bd"
$exportCsv = "unde vrei sa fie exportat fisierul"

Invoke-Sqlcmd -ServerInstance $server -Database "baza ta de date" -Username "" -Password '' -Query "procedura stocata" | Export-Csv -Path $exportCsv -Delimiter "

(Cosmin Popescu) #3

Varianta cu citire de la tastatura

Set-ExecutionPolicy Unrestricted -Scope CurrentUser
Import-Module SqlServer

$server = ""
$exportCsv = ""
$ceVreiSaCitestiDeLaKb = Read-Host -Prompt ""


Invoke-Sqlcmd -ServerInstance $server -Database ""  -Username "" -Password '' -Query "EXEC myUSP @param1Sp = $ceVreiSaCitestiDeLaKb, @param2 = $param2" | Export-Csv -Path $exportCsv -Delimiter ","

@iamntz sper ca este voie sa share-uim snippet-uri de cod ?


(Adavidoaiei Dumitru-Cornel) #4

Vad ca esti mare fan PoweShell, m-am jucat si eu dar nu pot zice ca is expert.


(Cosmin Popescu) #5

Doar niste scriptulețe pt o treaba rapida la serviciu
:slight_smile:


(Ionuț Staicu) #6

Chiar sunteți încurajați :slight_smile: