I often write sql to generate similar code, but when I copy and paste result, datagrip add quotes. I have to remove it manually. Is it possible to turn off this?
Thanks for the answer, but it's not what I'm trying to do. I'm defining a column by concatenating strings.
Like that, SELECT DISTINCT '"' || ep.key || '",' FROM analytics_338480108.events_20231116, UNNEST(event_params) ep WHERE event_name = 'click_add_fav'
And result is:
I want to copy paste exact what is in the result, but actually this what's happening:
I use quite often concatenations, for instance, when I want to do multiple selects to the same type of tables. The query looks like:
SELECT 'SELECT COUNT(*), "'||table_name||'" table FROM '||table_schema||'.'||table_name||' UNION ALL' FROM dataform.INFORMATION_SCHEMA.TABLES WHERE table_name LIKE 'snapshot%';
And again it ads quotes when I copy paste.
"SELECT COUNT(*), ""snapshot_banner_ad_positions"" table FROM dataform.snapshot_banner_ad_positions UNION ALL" "SELECT COUNT(*), ""snapshot_banner_ad_regions"" table FROM dataform.snapshot_banner_ad_regions UNION ALL" "SELECT COUNT(*), ""snapshot_banner_ad_reporting_users"" table FROM dataform.snapshot_banner_ad_reporting_users UNION ALL"
DataGrip 2023.2.3 Build #DB-232.10203.8, built on October 25, 2023 Runtime version: 17.0.8.1+7-b1000.32 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Metal Rendering is ON
Hi,
May I know how you copy the result set values: as separate cell values or the whole row(s)?
I copy the whole column
Thanks for the update.
Please provide the following information for further investigation:
- current DataGrip ver
- the table definition
- a few samples of rows wrapped in double quotes when copied from the data viewer
Thanks for the answer, but it's not what I'm trying to do. I'm defining a column by concatenating strings.
Like that,
SELECT DISTINCT '"' || ep.key || '",'
FROM analytics_338480108.events_20231116,
UNNEST(event_params) ep
WHERE event_name = 'click_add_fav'
And result is:
I want to copy paste exact what is in the result, but actually this what's happening:
I use quite often concatenations, for instance, when I want to do multiple selects to the same type of tables. The query looks like:
SELECT 'SELECT COUNT(*), "'||table_name||'" table FROM '||table_schema||'.'||table_name||' UNION ALL' FROM dataform.INFORMATION_SCHEMA.TABLES
WHERE table_name LIKE 'snapshot%';
And again it ads quotes when I copy paste.
"SELECT COUNT(*), ""snapshot_banner_ad_positions"" table FROM dataform.snapshot_banner_ad_positions UNION ALL"
"SELECT COUNT(*), ""snapshot_banner_ad_regions"" table FROM dataform.snapshot_banner_ad_regions UNION ALL"
"SELECT COUNT(*), ""snapshot_banner_ad_reporting_users"" table FROM dataform.snapshot_banner_ad_reporting_users UNION ALL"
DataGrip 2023.2.3
Build #DB-232.10203.8, built on October 25, 2023
Runtime version: 17.0.8.1+7-b1000.32 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Thanks,
Dana
It wraps the values of the copied result set with quotes indeed. I have reproduced this issue and had it reported here:
https://youtrack.jetbrains.com/issue/DBE-19340
Please follow this issue to stay updated on the progress.