Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to check the column value is numeric or not

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: How to check the column value is numeric or not
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    Post subject: Reply to: How to check the column value is numeric or not
Reply with quote

How about this link

http://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    Post subject: Reply to: How to check the column value is numeric or not
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us