CONCAT with local storage

I am trying to use the CONCAT function to shorten inputs for an address field.

Here is what I am trying to do.

set @mcity = {{localStorage.values.mcompcity}};
set @mstate = {{localStorage.values.mcompprstate}} ;
set @mzip = {{localStorage.values.mcomppzcode}} ;
Set @mctry = {{localStorage.values.mcompctry}};
select CONCAT(@mcity, ", " , @mstate, " ", @mzip, " ", @mctry ) as @mlocn;
update Letter01 set Field4 = @mlocn where seq1 = 12;

The problem seems to be with @mlocn . I have tried variations with and without the @ prefix.

I see that the intellsense does not have CONCAT in its library.

I have found a way around this but it would be better looking if the variables could be concatenated.

Mike

I have found a solution for this. From what I can find. CONCAT does not work with variables but it works fine with table fields so I have created some header fields which I have populated as below:

update Invoices01 set EXTRA1 = " ";
update Invoices01 set EXTRA1 = "TOP" limit 1;
update Invoices01 set header2 = (CONCAT(compcity, ", " , compprstate, ", ", comppzcode, " " , compctry)) where EXTRA1 = "TOP";

This populates the table with trim values combined together properly, see attached screen shot.
So I am out of the woods.
Mike
pict1