Copy data as csv is not working

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
Thenrich
Posts: 105
Joined: Sun 21 Dec 2014 19:47

Copy data as csv is not working

Post by Thenrich » Wed 02 Oct 2019 00:24

I select a column of numbers in the results grid and select copy data as csv and the output is the column of numbers instead of a list of comma separated values. It's also copying the header which it shouldn't.

Using SQL Complete 6.2.23.

alexa

Re: Copy data as csv is not working

Post by alexa » Mon 07 Oct 2019 09:13

We will fix this issue in one of the next product builds.

Thenrich
Posts: 105
Joined: Sun 21 Dec 2014 19:47

Re: Copy data as csv is not working

Post by Thenrich » Tue 05 Nov 2019 19:55

I noticed that the update from few days ago didn't include a fix for this issue. I hope it's coming soon.

alexa

Re: Copy data as csv is not working

Post by alexa » Wed 06 Nov 2019 10:37

We are planning to fix it in version 6.3.

Thenrich
Posts: 105
Joined: Sun 21 Dec 2014 19:47

Re: Copy data as csv is not working

Post by Thenrich » Fri 27 Dec 2019 19:26

This has not been fixed in 6.3.16. The two bugs I reported haven't been fixed!

alexa

Re: Copy data as csv is not working

Post by alexa » Mon 30 Dec 2019 10:26

Sorry for the delay on this.

Due to unforeseen circumstances, this was moved forward to version 6.4.

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: Copy data as csv is not working

Post by .jp » Thu 22 Oct 2020 06:14

Thenrich wrote: Wed 02 Oct 2019 00:24 I select a column of numbers in the results grid and select copy data as csv and the output is the column of numbers instead of a list of comma separated values. It's also copying the header which it shouldn't.

Using SQL Complete 6.2.23.
Hello,

Options to tune the behavior of the data coping is implemented in a new version of SQL Complete (v6.6).
Go to SSMS main menu -> SQL Complete -> Options... -> Data Export -> CSV then uncheck "Show a table header" and choose comma in "Field separator".

Best Regards.

Thenrich
Posts: 105
Joined: Sun 21 Dec 2014 19:47

Re: Copy data as csv is not working

Post by Thenrich » Thu 22 Oct 2020 06:26

That setting has no effect.

Do a select from any table.
Select a bunch of values in a single column.
Select Copy data as CSV,
Paste.

The result is just the values exactly as if I did a regular copy. The result should be the values separated by a comma in one line. It needs to work just like how Generate Script As Insert works. Generate insert creates a comma delimited list. Make Copy as CSV work in a similar fashion.

alexa

Re: Copy data as csv is not working

Post by alexa » Mon 26 Oct 2020 08:54

If you want to have the following:

Code: Select all

Buchanan, Callahan, Davolio, Dodsworth, Fuller, King, Leverling, Peacock, Suyama
you have to either execute the the query:

Code: Select all

USE [Northwind];
DECLARE @str nvarchar(max);
select @str = coalesce(@str + ', ', '') + [LastName] from [Employees]
PRINT @str;
or use another feature of dbForge by right-clicking in the grid and selecting 'Generate Script As -> WHERE IN()' from the popup menu.

Thenrich
Posts: 105
Joined: Sun 21 Dec 2014 19:47

Re: Copy data as csv is not working

Post by Thenrich » Mon 26 Oct 2020 16:23

Why don't you just fix it!?? I don't want to remember and write a special long query. I don't want to use some other option and edit its result. The option says copy data as csv. . What's the problem of creating csv values from my selection??

It's over a year now. You already said earlier that it will be fixed. Did you decide not to fix it?

I bought your tool and pay for upgrades so that I don't have to write that kind of query you're suggesting to use.

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: Copy data as csv is not working

Post by .jp » Tue 27 Oct 2020 09:48

Hello,

Thanks for the reply.
Why don't you just fix it!??
We classify this as the expected behavior (but not a bug) and it works as the same feature of SSMS (Data Result -> Save results As...).
Anyway, you are able to add this feature to vote on our UserVoice site.
Top-rated ideas will be included in SQL Complete roadmap.

Best Regards.

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: Copy data as csv is not working

Post by .jp » Tue 27 Oct 2020 10:18

By the way, as a workaround, you can add an empty virtual column to your query next to the data and export the column data to CSV the way you want.

This query
SELECT data1, data2, data3, data4
FROM table1;
should be transformed into the following query
SELECT data1, data2, data3, '' as empty_virtual, data4
FROM table1;
In the results grid make a selection of both data3 and empty_virtual then perform copying data to CSV.

Please have a look at the following example.

Have you managed to copy data to CSV with help of SQL Complete the way you want?

Thenrich
Posts: 105
Joined: Sun 21 Dec 2014 19:47

Re: Copy data as csv is not working

Post by Thenrich » Mon 18 Jan 2021 19:47

The workaround is to select the values in that single column in the grid. Select Generate Script AS WHERE IN() and copy to the clipboard. Paste it and then copy the csv part.

Post Reply