tvheadend stores everything in text files, so no SQL select or equivalent that I'm aware of.
That said, if you're a wizard with grep, sed and awk, I guess you could set up a script that reads the channel names from a text file, searches for that specific channel file, and edits it to add a specific group. Hardly a walk in the park, though.
If you look in your config (I don't know where it is on OE, but it'd be the equivalent of/home/hts/.hts/tvheadend on 'buntu) you'll find a directory calledchanneltags; in this, there are numbered files that describe the tags, e.g.
{
"enabled": 1,
"internal": 0,
"titledIcon": 0,
"name": "A channel tag name",
"comment": "",
"icon": "",
"id": <tagnumber>
}
Alongside this, you'll find a directory calledchannels. In this, you get a numbered file - one per channel - that describes the channel along with the tag information:
{
"name": "Channel Name",
"tags": [
<tag1>,
<tag2>
],
"dvr_extra_time_pre": 0,
"dvr_extra_time_post": 0,
"channel_number": <channel_number>
}
So I presume you could create the tags by hand, then search through the defined list of channel names you want to group; for each file that contains that name (should be only one, but be careful of Channel Blob, Channel Blob +1 and Channel Blob HD in any regexp), look for the "tags" string; after the leading [, insert the tag number of the tag you defined. You could even just overwrite everything between [ and ] with a definitive list if you wanted your source file to be <name> <tag 1> <tag 2> ... <tag n> sort of format (otherwise you need to handle the comma, or assume all channels have at least one tag already).
Just thinking aloud, someone else may have a better idea.