Forum Discussion
Srikanth0990
Jun 07, 2022Copper Contributor
Need help on CONCAT function for multiple column values
COL1 COL2 COL3 CONCAT RESULT B972 02 DPP ('B972','02','DPP');
- Jun 07, 2022Do you want the result to be this: ('B972','02','DPP');
If yes, this the formula
=CONCAT("('",A1,"','",B1,"','",C1,"');")
Patrick2788
Jun 07, 2022Silver Contributor
Depending on how precise you need the result to be, you might simply use:
=ARRAYTOTEXT(A2:C2,1)Srikanth0990
Jun 08, 2022Copper Contributor
If I use Arraytotext getting like below
{"B972",2,"DPP"}
{"B972",2,"DPP"}
- SergeiBaklanJun 08, 2022Diamond Contributor
- Srikanth0990Jun 10, 2022Copper ContributorHow it works if I include COL3
COL1 COL2 COL3 COL4 Result
B972 02 DPP INSERT INTO TABLE VALUES INSERT INTO TABLE VALUES('B972','02','DDP')
B9FD 02 DPP INSERT INTO TABLE VALUES INSERT INTO TABLE VALUES('B9FD','02','DDP')
B976 AB DPP INSERT INTO TABLE VALUES INSERT INTO TABLE VALUES('B976','AB','DDP')- SergeiBaklanJun 10, 2022Diamond Contributor
- Srikanth0990Jun 10, 2022Copper ContributorIt works, Thank you!