Oralce syntax

Question:

Can you explain to me what the belwo query is tryingot do ? is it trying ot grab only the numeric value?

where LENGTH(TRIM(TRANSLATE(tr.result_value, ‘ +-.0123456789′, ‘ ‘))) is null

Solution:

the really correct syntax should be
where LENGTH(TRIM(TRANSLATE(tr.result_value, ‘ +-.0123456789′, ‘ ‘))) = 0

and it would test, if there is no other symbol in the field result_value than space, plus, minus, dot and digits (0-9)
in short, this makes a first test if the field could be considered numerical data, or at least a maths expression.

Tags: · ·
digg delicious stumbleupon technorati Google live facebook Sphinn Mixx newsvine reddit yahoomyweb
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...