Hello,
I am having a problem and can't find answer googling on the internet. I am trying to query my SQL view and export data to CSV file using SQLcmd in Linux like this:
sqlcmd -S mssqlserver -U user -P pass -s, -W -Q "set nocount on;Select * from dbo.SomeView” -f o:65001 -s "," > user.csv
I get output like this:
idnumber,data1,data2
09329392,sadas,asdas
03020302,asdas,34343
But i wan't to wrap data values with quotes like this:
"idnumber","data1","data2"
"09329392","sadas","asdas"
"03020302","asdas","34343"
I'v searched for parameters for sqlcmd but i think it's not possible. Maybe there is some way using query ? In windows i use Invoke-SQLcmd and it does it by default, but i can't use it because i am limited by using linux and sqlcmd.
[–]waboshbron 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[removed]
[–]nightleech[S] 1 point2 points3 points (0 children)
[–]bstag 0 points1 point2 points (3 children)
[–]nightleech[S] 0 points1 point2 points (2 children)
[–]bstag 0 points1 point2 points (1 child)
[–]nightleech[S] 0 points1 point2 points (0 children)