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
 

 

Validating Dates in VARCHAR columns

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
dlmedici

New User


Joined: 05 Oct 2006
Posts: 1

PostPosted: Thu Oct 05, 2006 9:56 pm    Post subject: Validating Dates in VARCHAR columns
Reply with quote

At the moment I am without a mainframe connection, so I cannot experiment.

Assume the following columns on TABLE_X:
Code:
   CLAIM_NBR     INTEGER
   DATE_VALUE   VARCHAR(255)

How can I write a query that will return all claim numbers where the VARCHAR column is not a date? Will the following work:

Code:
SELECT CLAIM_NBR
FROM TABLE_X
WHERE DATE(DATE_VALUE) IS NULL
Back to top
View user's profile Send private message

cooolguy

New User


Joined: 05 Sep 2006
Posts: 9

PostPosted: Fri Oct 06, 2006 4:01 pm    Post subject: Re: Validating Dates in VARCHAR columns
Reply with quote

Yes David that will work.
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 unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Need help in reading and validating a... ABINAYATHULASI COBOL Programming 8 Tue Apr 18, 2017 11:42 am
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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