vbnetcoder
asked on
string fuctions
I have a field (name ratio value) that has data that looks like this 12:64
(ie. two numbers separated by ":")
How would i break it apart in a select query so everything to the left of ":" is returned as 1 aliased field and everything to the right of ";" is another?
(ie. two numbers separated by ":")
How would i break it apart in a select query so everything to the left of ":" is returned as 1 aliased field and everything to the right of ";" is another?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
similarly if the left side is always 2 and your right side is always 2 then you can simplify a lot
select left(ratio_value,2) as firstpart, right(ratio_value,2) as secondpart from your table
select left(ratio_value,2) as firstpart, right(ratio_value,2) as secondpart from your table
ASKER
ty
Open in new window