Hi, I'm new to DB2 so I apologize if this is a dumb question. :)
I have this table with 2 columns
col_date (varchar(8)) (eg. 20070813) (yyyyMmdd)
col_time (varchar(6)) (eg. 1525) (HHmm)
I have to write a query to select data larger than some date and the problem is my 2 columns are of type varchar
I tried to do something like this..
SELECT * FROM blah WHERE CAST(CONCAT(col _date, col_time) AS INTEGER) > 200708081538
but it doesn't seem to work.. it seems I can't put the CONCAT function inside CAST for some reason...
thanks for any help!
I have this table with 2 columns
col_date (varchar(8)) (eg. 20070813) (yyyyMmdd)
col_time (varchar(6)) (eg. 1525) (HHmm)
I have to write a query to select data larger than some date and the problem is my 2 columns are of type varchar
I tried to do something like this..
SELECT * FROM blah WHERE CAST(CONCAT(col _date, col_time) AS INTEGER) > 200708081538
but it doesn't seem to work.. it seems I can't put the CONCAT function inside CAST for some reason...
thanks for any help!
Comment