Check for ASCII values in fields

I am writing an app from another app and there is a function to cleanse certain fields because when the code was transferred to their DB it was sent as UNICODE or something like that. SO they are running this code to "cleanse" the fields

                strArray = stringEncodingTest.GetBytes(city)
                ansiiCleaned = stringEncodingTest.GetString(strArray)
                city = ansiiCleaned

I want to follow suit in SQL Developer

Any thoughts out there!!!
jknj72Asked:
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.

jknj72Author Commented:
Is there a function that I can pass a string and get back maybe a true or false if there is something other then ASCII values?
0
slightwv (䄆 Netminder) Commented:
I'm not sure what you are trying to do.

If you want to convert Unicode into the native characters take a look at UNISTR:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions224.htm#SQLRF06154

If you want to see if unicode characters exist in the column, you might be able to use  ASCIISTR and compare it with the column itself:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions014.htm#SQLRF00605

Some unicode characters are actually considered ascii so this is where the confusion comes in.

What is the characterset of the database?
What is the data type of the column in question?

Can you post some examples of what you are wanting to do?
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
jknj72Author Commented:
yeah sure I will get you some examples...Thanks
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
is it more of a case that your scrubbing the data and want only ASCII characters <127 (0-9, A - z)?

Jim.
0
jknj72Author Commented:
Sorry for not responding for so long, I actually forgot I posted it. I wasn't at the point in my project but I am knee deep in it now....

Slight - I will read that article tonight and let you know what I come up with. Also will have to answer your questions tomorrow when Im at work

Jim - You are correct, The program I am rewriting scrubs the data because I guess when they did a migration of the data and that some of the data is in Unicode format, or something like that. I don't know the exact specifics.

Anyway, in the current program they run .NET functions to check a few columns and scrub the columns to just bring back ASCII values. I was hoping SQL Developer would have something similar.

Thanks guys!
0
slightwv (䄆 Netminder) Commented:
Seems like you are doing a LOT of .Net to Oracle porting.

You do know that Oracle now allows .Net stored procedures:
http://www.oracle.com/technetwork/articles/dotnet/williams-sps-089817.html

Might save you some time.
0
jknj72Author Commented:
Its all from the same program written in .NET accessing Oracle data so we decided to create a package with the logic from the .NET program in the package.  I wanted to do it in SSIS because the end result is tables being populated and then exported to text files for a vendor program to pick it up. I could have used the source as Oracle, manipulate the data, then have a text file destination.  But Im not the boss
0
jknj72Author Commented:
That's what I needed...Thanks
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.