Jump to content

Recommended Posts

Posted

Bhayyas,

Oka column lo numerica and character data vundi
Like 0.2, 0.3, na, invited...

Req is
If numeric (0.2) multiply by 100
If character keep it as it is

Etla cheyali koncham cheppandi

Posted

SELECT CASE WHEN ISNUMERIC(COLUMN) =1 THEN CONVERT(VARCHAR(100),(CONVERT(INT,COLUMN)*100)) ELSE COLUMN END FROM TABLE

Posted

okavela numreic ite 100 tho multiply cheyala? eda nee question naak ardam kale kani to know if its numeric or not ..ISNUMERIC use cheyi

Posted

%<>( 1%20%2834%29.gif

okavela numreic ite 100 tho multiply cheyala? eda nee question naak ardam kale kani to know if its numeric or not ..ISNUMERIC use cheyi

 

Posted

Decode (table.column,'9.9',(column*100),column)
Or use case when.

Posted

Isnumeric invalid antundi , I guess it is SQL server function
Oracle lo kavali

Posted

google cheyach kada dude ee afdb lo kante not just the answer you can read the following discussions too kada just a suggestion

LENGTH(TRIM(TRANSLATE(, ' +-.0123456789', ' ')))
Posted

lets say your column is TEST

table is TABLE..

 

select TEST,

CASE when TEST = NA then NA,

CASE WHEN TEST <> NA then TEST*100

END AS NEW_TEST_COLUMN

 

from TABLE

Posted

lets say your column is TEST

table is TABLE..

 

select TEST,

CASE when TEST = NA then NA,

CASE WHEN TEST <> NA then TEST*100

END AS NEW_TEST_COLUMN

 

from TABLE

 

what if he has other alphabetic entries other than "NA"
 

Posted

what if he has other alphabetic entries other than "NA"
 

looks lik tht is not the case.

if tht is the case..

query to identify Chars and numeric shd be written..and then go forward..

 

something like

if Value/100 = Numeric value...then proceed

if value/100= Not Valid...then straight move

Posted

looks lik tht is not the case.

if tht is the case..

query to identify Chars and numeric shd be written..and then go forward..

 

something like

if Value/100 = Numeric value...then proceed

if value/100= Not Valid...then straight move

 

Oka column lo numerica and character data vundi
Like 0.2, 0.3, na, invited...

Posted

Oka column lo numerica and character data vundi
Like 0.2, 0.3, na, invited...

depends on data man...

if u are asking for generic query...then u can 

write as ..

if TEST like any [A-Z ] then straight move

if test like only [1-9] then multiply by 100

×
×
  • Create New...