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.