Wednesday, March 7, 2012

get text after a delimiter

In a table I have a column named "Installment" which stores
installment like 9/15, 2/10 etc., where first number is the last
installment deducted and the last number is the total number of
installments. I want to pick any text after "/" using SQL Query. Which
function to use? I am using SQL Server 2005 Express.See funtions LEFT, RIGHT, CHARINDEX, PATINDEX, REPLACE, PARSENAME in BOL.
Example:
select parsename(replace('2/10', '/', '.'), 1)
go
AMB
"RP" wrote:
> In a table I have a column named "Installment" which stores
> installment like 9/15, 2/10 etc., where first number is the last
> installment deducted and the last number is the total number of
> installments. I want to pick any text after "/" using SQL Query. Which
> function to use? I am using SQL Server 2005 Express.
>

No comments:

Post a Comment