Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#140·textql

Neither CONCAT nor || are working for concatenating

Author: whalekeykeeperCreated Jun 18, 2023Updated Jun 18, 2023

My goal is to concatenate two strings, such as first_name and family_name. I tried with:select concat(first_name, ' ', family_name) as name from survey, the result is no such function: CONCAT. Then I tried to use || as: select first_name || ' ' || family_name as name from survey, I got zsh: permission denied. I considered the case that it might be the textql command I used was wrong. I used:

textql -output-header -output-file csv/data/survey_fullname.csv -header -sql
"select CONCAT(first_name, ' ', family_name) as name from survey"
csv/data/survey.csv

I also tried the version to have ; at the end of the SQL statements. But if I replaced the content of the sql statement, everything goes well. I wonder if textql support concatenation of strings?

Source: dinedal/textql

View original on GitHubView discussion on GitHub