Reputation: 341
I'm trying to copy data from one DB into another on the same server. For this I'm using a bash script:
mysql -uroot -pMYPW -D "ucb-pvapp" -e "insert into app_daily_quartiles (postcode, lo_limit, hi_limit, median) select (PLZ, loLimit, hiLimit, median) from solarlogmesswerte.tagesquartilekleinraum2"
I tried using the dbDest.table notation for the destination too but that gave me an error.
Now I get. ERROR 1241 (21000) at line 1: Operand should contain 1 column(s)
But I'm not able to find the error.
Using version: 8.0.23-0ubuntu0.20.04.1
Upvotes: 2
Views: 229
Reputation: 697
Remove brackets from select
.
So it should go like
insert into app_daily_quartiles (postcode, lo_limit, hi_limit, median)
select PLZ, loLimit, hiLimit, median from solarlogmesswerte.tagesquartilekleinraum2
Upvotes: 1