All Forums UDA
karthik.M 5 posts Joined 01/08
19 Jan 2009
Bad Character in Varchar defined column

Hi,Fee column is defined as varchar which consists of both alphanumeic and decimal values.I need to identify alphanumeric values and delete from table.How can we acheive this and what will be the easiest way?Thanks in advanceregards,kartheek M

Ramachan...Ganesan 1 post Joined 01/09
20 Jan 2009

Delete from $table where $column between 'a' and 'z' or $column between 'A' and 'Z';Note:the above query will delete all the alphanumeric values except the one starts with numeric value.

karthik.M 5 posts Joined 01/08
21 Jan 2009

Hi,I will explain the problem more clearlyLets assume FEE column conatins values like Fee27M50.0010.0203.2Among these I need to identify values which contain alphabetic or special characters also and delete them like 27M50.00.Ram,I tried above query,didn't work.Thank you

Jitender Aluri 6 posts Joined 01/09
22 Jan 2009

Try this:del from tablenamewhere fee like any ( '%A%','%B%','%C%','%D%','%E%','%F%','%G%','%H%','%I%','%J%','%K%','%L%','%M%','%N%','%O%','%P%','%Q%','%R%','%S%','%T%','%U%','%V%','%W%','%X%','%Y%','%Z%');

sRavanSarma 23 posts Joined 11/08
24 Jan 2009

Hi,i got a question here,Does this query works to obtain the desired result set,DELETE FROM TABLE_NAME WHERE Fee LIKE '%A-Z%';

25 Jan 2009

Hi Kartik,Please explain your problem more clearly.Do you want to delete entire row if your condition satisfies? oryou want to delete only column value?

arunprakash24 3 posts Joined 07/08
29 Jan 2009

Hi Karthik,You can use the below query to delete all alpha numeric entriesDELETE FROM $tablename WHERELOWER($columnnane) (CASESPECIFIC) <>UPPER($columnnane) (CASESPECIFIC);Regards,Arun Prakash

karthik.M 5 posts Joined 01/08
03 Feb 2009

Hi Guys,Thanks to all of you for your answers.sRavanSarma I tiried your query,it's not giving the answer.queries from arunprakash and jitender are working fine likeDELETE FROM $tablename WHERELOWER($columnnane) (CASESPECIFIC) <>UPPER($columnnane) (CASESPECIFIC) Regards,Kartheek.M

You must sign in to leave a comment.