How to remove spaces in data spooled from database

Hello,
I am trying to spool a simple select statement to a text file.  The problem I am running into is that additional spaces get added  my data.  For eg

set pages 0;
set echo off;
set trim on;
set linesize 250;
set trims on;
set heading off;
set space 0;

select 'KIT-' || trim(field1) || '-' || trim(field2) || '-PACK' as data from table
where trim(field3)='xxx'
order by field1;

spool off;
quit

My data should be
KIT-data1-data2-PACK

However, I am getting
K I T - d a t a 1 - d a t a 2 - P A C K

Please help
Dianna ChuaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nitin SontakkeDeveloperCommented:
Looks like a DBCS (Double Byte Character System) problem to me. I obviously don't know the answer from Oracle perspective.

Is your data-type by any change nvarchar (in Microsoft SQL Server parlance!)? If yes, could you try convert it to varchar and then try, may be!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dianna ChuaAuthor Commented:
Thanks!  Never thought of that!

My data-type is NCHAR in Oracle.  Worked after I converted it to CHAR.
0
Nitin SontakkeDeveloperCommented:
Might as well formally close the question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.