Concat query showing result less than 1024 characters

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

Concat query showing result less than 1024 characters

Postby zain » 08. October 2020 10:22

Hello all,

This is my very first post here.

I am running into a problem where I expected my MySQL CONCAT query to return up to 1024 characters but unfortunately, I get only about 50 characters before I start seeing the ellipses coming in.

Here is my query, from a table that is called
Code: Select all
master_reference_summary


Code: Select all
SELECT master_data_name, CONCAT_WS(', ', ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12, ref13, ref14, ref15, ref16, ref17, ref18, ref19, ref20) AS 'Reference Attribute Name', CONCAT_WS(', ', att1, att2, att3, att4, att5, att6, att7, att8, att9, att10, att11, att12, att13, att14, att15, att16, att17, att18, att19, att20,  att21, att22, att23, att24, att25, att26, att27, att28, att29, att30, att31, att32, att33, att34, att35) AS 'Attribute Name' FROM master_reference_summary GROUP BY master_data_name;


This is an excerpt of the output I got back from MySQL:

Code: Select all
master_data_name|Reference Attribute Name                             |Attribute Name
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Area            |                                                     |Id   
----------------+-----------------------------------------------------+---------------------------------------------
Basin           |                                                     |Id   
----------------+-----------------------------------------------------+---------------------------------------------
Blocks          |PscId, CountryCode, RegionId                         |ID, UPI, BlockName, PscName, AwardedAcre, AwardedA...
----------------+-----------------------------------------------------+-----------------------------------------------------
Company         |                                                     |Id   
----------------+-----------------------------------------------------+-----------------------------------------------------
Crude           |                                                     |ID, CrudeName, TerminalId, IsCrudeoil, IsOsp, Crud...
----------------+-----------------------------------------------------+-----------------------------------------------------
Customermaster  |IdentityTypeRK, GenderRK, StateRK, Country, Langua...|Id, RecordID (SK), Account No, IdentityNumber, Oth...
------------------+---------------------------------------------------+-----------------------------------------------------


As I know MySQL, CONCAT should be able to show up to 1024 characters... but the above query result only show up to 50 characters...

So my question is... What do I need to change, so that my query above would return all of my concat results... (I have checked using CHAR_LENGTH of my concat_WS that the longest character length is ONLY 398 characters long... nowhere near the 1024 character limit for concat)

Really appreciate any feedback on this matter.
zain
 
Posts: 2
Joined: 08. October 2020 09:13
XAMPP version: 7.4.2
Operating System: windows 10

Re: Concat query showing result less than 1024 characters

Postby zain » 09. October 2020 05:29

OK, I found out that it was the phpmyadmin settings that needed to be changed to show 'Full Text' instead of 'Partial text'.

Also, I was using the Tabulator JS library in Node-Red ui_table, and it just so happens that it was also showing truncated text after my MySQL query to MariaDB. That too was caused by a table parameter setting that needed to be set to 'textarea' to show the entire query output. (Here is the link http://tabulator.info/docs/4.1/format)

Problem resolved, and as it turns out... it's not a MySQL problem after all.

Thanks all for dropping by.
zain
 
Posts: 2
Joined: 08. October 2020 09:13
XAMPP version: 7.4.2
Operating System: windows 10


Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 20 guests