Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Export data from sql to CP1250 encoded file

$
0
0

Help me Scripting Guys!

I have an SQL table and I need to export data in CP1250 encoded file.

I tried export-csv, out-file but I can't export in this code page. Is there any option to my problem?

My last probe:

  $sqlds.Tables[0] | Export-Csv "C:\Admin\PowerShellTest\export.csv" -notype -delimiter "|" -encoding "Default"

 (gc C:\Admin\PowerShellTest\export.csv) | % {$_ -replace '"', ""} | out-file C:\Admin\PowerShellTest\export.txt -Fo -En <problem is here>

Thank you.


Viewing all articles
Browse latest Browse all 2562

Trending Articles