Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Comparing dates in different formats migusd SYNCSORT 4 Sat Nov 18, 2017 3:02 am
No new posts Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us