IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to check the column value is numeric or not


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
muralithirumalaisamy
Warnings : 1

New User


Joined: 13 Jun 2005
Posts: 12
Location: chennai

PostPosted: Tue Nov 04, 2008 3:10 pm
Reply with quote

Hi,

Can anybody help me to write a query to check the value of a particular table column is numeric or character.

Thanks
Murali
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Nov 04, 2008 3:50 pm
Reply with quote

How about this link

www.db2portal.com/2006/03/returning-only-numeric-data.html
Back to top
View user's profile Send private message
muralithirumalaisamy
Warnings : 1

New User


Joined: 13 Jun 2005
Posts: 12
Location: chennai

PostPosted: Tue Nov 04, 2008 8:05 pm
Reply with quote

Thanks a lot...
Back to top
View user's profile Send private message
lenygold

New User


Joined: 22 Oct 2008
Posts: 3
Location: baltimore

PostPosted: Wed Nov 19, 2008 11:08 pm
Reply with quote

Have fun:

SELECT CODE_DESC, 'NUMERIC' AS DATA_TYPE
FROM SIDDE010.VCODES TB1
WHERE LCASE(CODE_DESC) = UCASE(CODE_DESC)
UNION ALL
SELECT CODE_DESC, 'NOT NUMERIC' DATA_TYPE
FROM SIDDE010.VCODES TB1
WHERE LCASE(CODE_DESC) <> UCASE(CODE_DESC);

CODE_DESC DATA_TYPE
---------+---------+---------+---------+---------+-----
1099 NUMERIC
601 NUMERIC
602 NUMERIC
.............................................................

COURT LOCATION NOT NUMERIC
COURT ORDER FREQUENCY NOT NUMERIC
COURT ORDER SUBTYPE NOT NUMERIC
COURT ORDER TYPE NOT NUMERIC
COURT ROOM NOT NUMERIC icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts How to load to DB2 with column level ... DB2 6
No new posts SCOPE PENDING option -check data DB2 2
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top