Re: find records with only numbers

2009-04-13 Thread Claudio Nanni
He is looking only for six digit numbers. select field1 as f from table1 t where t.f regexp '^[0-9]{6}$' does the job Claudio Pinter Tibor wrote: Ed Reed wrote: I hope someone can give me a suggestion on this. I'd like to find records in a table where a specific field only contains a num

Re: find records with only numbers

2009-04-13 Thread Pinter Tibor
Ed Reed wrote: I hope someone can give me a suggestion on this. I'd like to find records in a table where a specific field only contains a number. For example, Select Field1 as f from table1 as t where lcase(t.f) not like in ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p',

Re: find records with only numbers

2009-04-13 Thread Claudio Nanni
Hi, this can be easily solved by using regular expressions. select field1 as f from table1 t where t.f regexp '[0-9]{6}' Cheers Claudio Nanni Ed Reed wrote: I hope someone can give me a suggestion on this. I'd like to find records in a table where a specific field only contains a number.

find records with only numbers

2009-04-13 Thread Ed Reed
I hope someone can give me a suggestion on this. I'd like to find records in a table where a specific field only contains a number. For example, Select Field1 as f from table1 as t where lcase(t.f) not like in ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','