SQL Queries

35 pts.
Tags:
Data Types
SQL
SQL Query
pls any one help me I Need to disply in o/p only alphabets but not any numbers or integers for this i/p as follows i/p o/p ----- ---------- 1.2NE NE 1.1NN NN 1.3.1NE NE 1.1CE CE 1.2.2NN NN 1.6.2NN NN 1.3CE CE 1.3CE CE 1.1 --- 2 ---- 11 -- THANKS IN ADVANCE SURENDRA

Answer Wiki

Thanks. We'll let you know when a new response is added.

It is not possible to perform regular expression searching in sql server (except if you create a dot.net stored procedure), so there is not a simple way to perform this query.

You can try someting like this:

select ip,
replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(ip, ’0′,”),’1′,”),’2′,”),’3′,”),’4′,”),’5′,”),’6′,”),’7′,”),’8′,”),’9′,”),’.’,”),’,’,”)
as OP from yourtable

I know, it’s a very ugly query, but it should works :)

regards,

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following