After a using of function TO_CHAR the result has its center alignment. Is there an option to set the result alignment to the right side ?
My query is:
SELECT DISTINCT p.DOC_FIO,
TO_CHAR (COUNT (p.DOC_FIO) OVER (PARTITION BY p.DOC_FIO), '99G999G990') AS cnt_doc,
TO_CHAR (MAX (p.cost_pr) OVER (PARTITION BY p.DOC_FIO), '99G999G990D00') AS max_doc,
TO_CHAR (AVG (p.cost_pr) OVER (PARTITION BY p.DOC_FIO), '99G999G990D00') AS avg_doc,
TO_CHAR (SUM (p.cost_pr) OVER (PARTITION BY p.DOC_FIO), '99G999G990D00') AS sum_doc
FROM lpu.rees_pos p
WHERE (p.date_e >= '01.11.2023' AND p.date_e < '01.12.2023') AND p.lid = 450
ORDER BY p.DOC_FIO
That would be nice if there were formats string like '**AL', '**AC','**AR'
The result of your TO_CHAR expressions is right-aligned. However, it could be that due to the font selected for the output, the text appears to be centered.
In a proportional font, the space is usually quite narrow and takes up less space than a digit, giving the impression that the numbers are not right-aligned.
Try a monospaced font such as "Courier New".
Sample: (proportional font)
. 1
. 23
. 456
.7890
This looks like the numbers are centered or even left aligned, although each line has exactly 4 characters.
Same text with a fixed font.
1
23
456
7890
Now you can see the numbers are actually right aligned.
It is all right now. because I've restarted Toad. Thanks.
That was easy.
But no, that happens again. The problem is on
Listen, It is obvious that I am not sure how to change the font in query result window. That is funny
From your screenshot I assume you're at the wrong category in the options. (Query Builder)
To change the font for the result grids, you need to goto "Data Grids / Visual":