Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-25-2024, 05:00 AM   #1
rantanplan
Weirdo
rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.
 
Posts: 835
Karma: 11003000
Join Date: Nov 2019
Location: Wuppertal, Germany
Device: Kobo Sage, Kobo Libra 2, Boox Note Air 2+
Change datatype from text to comma separated?

I have a column in Calibre where I document how I got the ebook. E.g. Kindle, Kobo, Humblebundle etc. Sometimes I have multiple copies of the same book from different sources, but when I set this column up, it was configured as a text field (in tag browser).

Is it possible to change this column to comma separated text by manipulating a table in the sqlite database itself? I'd create a backup first, obviously, but would that be possible?
rantanplan is offline   Reply With Quote
Old 11-25-2024, 07:16 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Have you tried creating a Tag like column and then using Bulk Metadata Edit->Search & replace to copy the single value text column onto the new Tag-like column?

This worked for me:

Click image for larger version

Name:	Screenshot 2024-11-25 231426.jpg
Views:	71
Size:	271.4 KB
ID:	212197

Then delete the old column and rename the new one (lookup and header).


BR
BetterRed is offline   Reply With Quote
Advert
Old 11-25-2024, 12:37 PM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by rantanplan View Post
I have a column in Calibre where I document how I got the ebook. E.g. Kindle, Kobo, Humblebundle etc. Sometimes I have multiple copies of the same book from different sources, but when I set this column up, it was configured as a text field (in tag browser).

Is it possible to change this column to comma separated text by manipulating a table in the sqlite database itself? I'd create a backup first, obviously, but would that be possible?
The main difference between text and CSV in the database is the is_multiple column (in the custom_columns table) being set to 1, but there may be other differerences that I'd be hesitant to try chaley would know more details.

My method of 'converting' a column is what BetterRead said - column2, search-and-replace, delete and rename. Any templates or plugin settings using it will automatically switch over, though you might need to re-create column icon/colouring settings.

Last edited by ownedbycats; 11-25-2024 at 12:48 PM.
ownedbycats is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibre db result with comma separated id's MasterPlexus Calibre 4 11-20-2024 12:38 AM
Escaping Comma in Custom Comma Separated Text Column Kelpman Library Management 2 12-07-2023 10:58 AM
Search and Repace in comma separated list Hortensia Library Management 2 10-20-2021 05:47 PM
Custom column - Comma separated text MerlinMama Library Management 4 09-17-2015 02:34 PM
Switching author name from comma separated to first last kbaggs Library Management 1 01-30-2011 03:36 PM


All times are GMT -4. The time now is 01:12 PM.


MobileRead.com is a privately owned, operated and funded community.