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
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
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts Validating TSO node id in Job venkaraj JCL & VSAM 16 Thu May 05, 2016 4:41 pm
No new posts Only text from varchar Seppe DB2 8 Thu Apr 21, 2016 10:42 pm


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