More Oracle regexp_like

Two more examples of regexp_like for the memory banks:


-- convert to NULL if SOME_COL is not A,B,C,1,2,or 3
case
when (regexp_like(a.SOME_COL,'[^A-C1-3]'))
then NULL
else
a.SOME_COL
end as SOME_COL,

-- convert to 0000 if the col's value is not a series of valid digits
case
when (regexp_like (a.ANOTHER_COL,'[^[:digit:]]'))
then '0000'
else
a.ANOTHER_COL
end as ANOTHER_COL,

Posted in oracle/sqlserver/database | Leave a comment

Raised bed garden starting to produce!

It has been barely 3 weeks since we first [reported] plucking the first vegetable from our raised bed garden. Since then, our garden has just exploded!

2422 South Gaines

Continue reading

Posted in general | Leave a comment

Perfect summer dinner

dinner!

Farmer’s market “Carbon” tomatoes with fresh basil from our garden in a caprese salad, flank steak from the grill, pasta and fresh vegetables seasoned with herbs from our garden. Tasty!

Posted in general | Leave a comment

Buffalo River pt. 4

Actually, Pinnacle Mountain…
Continue reading

Posted in general | Leave a comment

Buffalo River pt. 3

Visiting the Nars
buffalo river 2009click for full size

correction: Elk, not deer!
Continue reading

Posted in general | Leave a comment

Buffalo River pt. 2

This is the continuation of the Buffalo River posts, part 1 is [here]…

map from http://www.buffaloriver.com/rivermap.aspx
Continue reading

Posted in general | Leave a comment

Buffalo River pt. 1

Me and my buddies took a late June trip up to the Buffalo River.
Our three day route was to take us between Mt. Hersey and Gilbert:
buffaloriver.com
Continue reading

Posted in general | Leave a comment

Walk it off!

Caught an elbow reaching in trying to poke a rebound away:
Continue reading

Posted in general | Leave a comment

Raised bed garden- first fruit!

Gabe did the honors of plucking our first garden vegetable today. We chopped up the banana pepper, it was full of fresh-from-the-garden goodness:

gabe

Posted in general | Leave a comment

Numeric validation with Oracle regexp_like

PROBLEM:
Identify records where there is non-numeric values for a particular column.

SOLUTION:


select SOME_COL
from SOME_TBL
where regexp_like (SOME_COL,'^[^[:digit:]]')
;

Obviously this implies that maybe the field should be a NUMBER datatype to start with, but sometimes what we want, what we should have, and what we actually have are not the same thing.

Posted in oracle/sqlserver/database | Leave a comment