Hi there
I was wondering how I would do the below in SQL 2005.
I have a column A in table TBL. Column A has the following values:
4h
7h
24h
100h
I would like to work out the total number of hours in this column with a select statement. So my initial thoughts were somthing like this but I appreciate my left won't work properly in for the 24 and the 100 values.
select sum(left(A,1) from TBL ..
I would therefore like to chop the "h" before doing my sum any advice would be great thanks!
S
I was wondering how I would do the below in SQL 2005.
I have a column A in table TBL. Column A has the following values:
4h
7h
24h
100h
I would like to work out the total number of hours in this column with a select statement. So my initial thoughts were somthing like this but I appreciate my left won't work properly in for the 24 and the 100 values.
select sum(left(A,1) from TBL ..
I would therefore like to chop the "h" before doing my sum any advice would be great thanks!
S