Using Command Prompt calling SqlPlus utility, a extra space is observed in SqlPlus utility as well but not in Toad.
The Field defined is Varchar2(7 bytes) and the value length is 6 bytes. The result output in spool file saves a 1 byte extra space when queried using SqlPlus utility.
Any clue why Toad is not showing a space but SqlPlus does.
Can you give us a specific example and steps to reproduce the problem?
there's a query, that's my test case.
Notice the Red Heighted in these images from Sql Plus:
The spool from Toad that does not have Byte space in output.
I believe that by default, SQL Plus is lengthening the fields so that the entire column name is displayed. Your column names are 1 character longer than your values, hence the extra space.
In SQL Plus you can specify the length of the column by using "column name format a10". This would cause any output column named "name" to be outputted in 10 characters or less.
that is right - I missed to observe it
I am trying to resolve data output like below "NULL" or "?" is saved in the output, not sure if Sql Developer is any issue (user is using) but Toad is not showing the same results.
How are you getting that output from Toad? Again, specific steps to reproduce the problem will help me a lot, and your problem will be resolved faster.
Are you sure that isn't in the data?
try this:
select SOURCE2, DUMP(SOURCE2)
from...
see if the lengths and last characters are really what you think they are:
Thank you John for looking into it.
On SqlPLus screen, output does not show "?" but in the spool *.xlsx.
Upon further testing, Excel output is saving "?", but not CSV.
Probably its a bug in SqlPlus/SqlDeveloper but Toad saves xlsx output correctly.
As a workaround saving the output in CSV is a fix.