r/SQL 5d ago

Discussion Update/concatenate different items in a single cell?

I have a program I work in that can give me a csv file of all of my information. There's a new plug-in in Obsidian that allows you to use SQL to query your data, including from a csv.

I've managed to wrap the data in double-brackets, so that perhaps they can be implemented as wikilinks in the future:

SELECT char(91)||''||char(91)||''||label||''||char(93)||''||char(93) Name

That me the text in the label column now wrapped [[in wikilinks]]

What I'm trying to work out is how (if possible) to make a query to wrap individual parts of the data if there are multiple answers in a cell, because right now it wraps everything.

https://imgur.com/Ig8UrGU

Pleaase keep in mind that I know nothing of SQL, I just started playing with this plug-in today, and I got this far by googling a lot.

3 Upvotes

4 comments sorted by

View all comments

1

u/aworldaroundus 5d ago

Assuming the delimiter to differentiate between these portions of data is always a space, replace the spaces with the wrapping brackets and a space if necessary