character set mismatch in Oracle

I got "ORA-12704: character set mismatch" error with the following query in Oracle. Any suggestions?

select 'Clerk1' as Clerk_Name from TBL1
union
select distinct Clerk_Name from TBL1
order by Clerk_Name;


Thanks.
mrongAsked:
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.

dsackerContract ERP Admin/ConsultantCommented:
Try:

select 'Clerk1' as Clerk_Name from dual
union
select Clerk_Name from TBL1
group by Clerk_Name
order by Clerk_Name;

If you select 'Clerk1' from the same TBL1 as you do in your union, you could end up with a lot of records with 'Clerk1'. Would it be correct to assume you want 'Clerk1' to only show up once?

If not, perhaps you can explain your objective.
slightwv (䄆 Netminder) Commented:
What data type is clerk_name in TBL1?

If NVARCHAR2 try:

select cast('Clerk1' as nvarchar2(10)) as Clerk_Name from DUAL
 union
 select distinct Clerk_Name from TBL1
 order by Clerk_Name;

You might want to rethink your select.  the "order by" is for both sides of the union so if a clerk_name is 'Albert', it will appear before 'Clerk1' in the output.

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
mrongAuthor Commented:
select 'Clerk1' as Clerk_Name      
          *
ERROR at line 1:
ORA-12704: character set mismatch

Clerk_Name: NVARCHAR2(50)
slightwv (䄆 Netminder) Commented:
Use the CAST I posted and the select from DUAL dsacker posted.

Make sure you read what I posted about the ORDER BY.
Peter AnzenbergerCommented:
Thank you for your example. It helped a colleague of mine a lot. He went home with a happy smile on his face.
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.