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

Validating Dates in VARCHAR columns


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Increase the number of columns in the... IBM Tools 3
No new posts DB2 Views with Multiple SQL & Col... DB2 8
No new posts Amount of days between two dates PL/I & Assembler 8
Search our Forums:

Back to Top