sqlitestudio icon indicating copy to clipboard operation
sqlitestudio copied to clipboard

Paste Null values directly

Open leyan opened this issue 3 years ago • 6 comments

When pasting values inside the grid view, I would like to be able to automatically paste NULL values. Currently, I have to paste the values into new rows and then press Backspace on all the cells where I want to see NULL values, as opposed to an empty string.

Is there a way to do it today? A setting I did not see? Otherwise, I would be willing to contribute it. In that case what would be the recommended approach? Do we need a setting to control which value is converted to NULL when pasting data?

leyan avatar Jan 03 '22 21:01 leyan

Recording 2022-01-03 at 23 02 58

pawelsalawa avatar Jan 03 '22 22:01 pawelsalawa

Sorry if I was not clear, I meant pasting from an external source, for example from a spreadsheet like LibreOffice Calc or Excel.

leyan avatar Jan 03 '22 22:01 leyan

How would SQLiteStudio know that you're pasting NULL and not empty string? What if someone else wants to paste empty string?

pawelsalawa avatar Jan 03 '22 22:01 pawelsalawa

That's why I was wondering about a configurable setting. A user could configure a special string, like "NULL" for example, to represent null values coming from an external source, without impacting other users.

Or in a first step, maybe only make it work for other data types where SQLiteStudio could guess that an empty string is not what the user wanted?

leyan avatar Jan 03 '22 22:01 leyan

Okay. Let's keep it as feature request.

pawelsalawa avatar Jan 03 '22 22:01 pawelsalawa

The CSV import function has a field to tell what NULL values should look like. You could possibly import your data from a CSV format instead of a spreadsheet. Depending where the data originates that might be the same number of manual steps.

JrgMyr avatar Jan 04 '22 10:01 JrgMyr