Stack Exchange
Insert data and concatenate one count conducted
I have a problem whereby I need to count the records and enter it into a field of the same table adding one.  
This code works
INSERT INTO t_grupo( nombre_grupo, cod_grupo )
VALUES (
"Christian", COALESCE( (
SELECT COUNT( * )
FROM t_grupo t
WHERE t.t_clase_cod_clase =3 ) , 0
)
)

But I need to also allow me was using so concatenate:
INSERT INTO t_grupo(nombre_grupo, cod_grupo) 
VALUES (
   "Christian", 
   COALESCE(
(
SELECT concat(COUNT(t.t_clase_cod_clase)+1,('.'))  FROM t_grupo t WHERE t.t_clase_cod_clase= 3 
), 0
)

But it does not allow me to concatenate.

I'm voting to close this question as off-topic because, unfortunately, we need questions to be in English.

Have you seen pt.stackoverflow.com? That might be more suitable.

Looks like You're missing a closing paren on the second one.

If this is just a bracket matching issue, indenting the nested calls helps a great deal. Andres, do you get an error with the second call? If so, what is it?

I need to insert this as I make?                                                        SELECT concat( t_clase_cod_clase, (
'.'
), count( * ) +1 )
FROM t_grupo t
WHERE t.t_clase_cod_clase =1

@halfer we aren't being very performant helping here. Ever work that word performant in yet, elsewhere ?

nevermind :> something we were laughing about 2 months ago
