Query result text is cut in the middle

Hello,

I execute a select statment with a long field name:

select status

as "schemaName.statusRofe.status"

from statusRofe ;

The column name in result looks like "schemaName.statusRof" .

Any ideas how to unlimit its length?


I do not understand your issue and would need additional information to assist you.

What is datatype and length of the ‘status’ column?

If you are after a shorter column header you can specify a shorter name like

…as “status”.

If you are seeing the output in a Toad DB2 data grid you can also resize the column header by moving your cursor over the boarder of the column header line and dragging it to make its size change.

You can also try to right click on the column header and select actions like: “Best Fit”, “Best Fit All columns”, “Fit to headers”.

Hope these tips help.

Thanks for your reply!

I cannot shorten the result filed name- this is the requirement :frowning:

I try to drag and resize the header; the header indeed goes fatter, but the cut text remains cut in the middle.

Fitting the cokumns as suggested with “BEST FIT” sizing the coulmn content but not the header (The header grows bigger but the cut characters are still not exist).

If you would like to understand the situation better, just use a simple select statment and name the field with a very long name (more than 25 characters).

Hoping it is more clear now, so you can better help me.

Thanks in advace!

When I run the query with a long column name it seems fine.

Please see my screen shot below.

Note that I have checked the option 'automatically apply best fit'.

Please let me know what datatype and length that column is as well.

Please post your screenshot of your results or send it directly to me.

If you could also post the result of this below query - that would be good too!

SELECT integer(10) AS "schemaName.statusRofe.status1234567890"
from sysibm.systables where SYSIBM.SYSTABLES.NAME = 'SYSTABLES';

My output of that statement is shown below:

Editor2.jpeg

My email is:

jeff.podlasek@quest.com

Thanks,

Jeff

Hello,

Sorry for the delay in responding...

As suggested I ran the query you post. Here is the result:

As you can see, the grid options are set correctly.

Any ideas?

Thanks in advance!

Can you also post screenshots of the failing query\column header?

Thanks

Jeff

At the bottom of the screen shot I’ve posted.

Thanks!

What version of Toad DB2 are you running? Please post a screenshot of your Help - About screen - thanks.

The version I use is a trial version 5.6.0.2916.

May this is the reason?

Yes - it seems that v5.6.0.x is truncating the column headers to 30 characters and that is what you are seeing. You should try v5.6.1 or v6.0 as I have not been able to create your issue in those later releases.

This might also have to do with the version of DB2 you are running your queries against.

What DB2 platform and version are you running?

If you are running on DB2 on z/OS, DB2 is truncating any specified col name string used in the “as clause” to 30 bytes. The maximum column name length on DB2 z/OS is 30 bytes, so it seems IBM is truncating to that length. You can check yourself if you run your query in SPUFI.