Pankaj Kabdal
Pankaj Kabdal

Reputation: 31

Remove the character at the end of the string

I want to remove the character ',' from the end of the below string.

eg:

v_rec(i).ACCOUNT_TYPE_NUM,v_rec(i).ACCOUNT_TYPE_CODE,v_rec(i).ACCOUNT_TYPE_DESCRIPTION,v_rec(i).INSERT_TMSTMP,

Could anyone pls suggest, how to perform.

Thanks.

Upvotes: 0

Views: 668

Answers (2)

The problem statement is not clear because you are using fields from the loop variable. please mention your problem statement in detail with a small snippet

Upvotes: 0

Popeye
Popeye

Reputation: 35900

Use rtrim as follows:

Select rtrim(your_column, ',') from your_table;

In PL/SQL, you can use rtrim the same way you use the normal function. (v_rec(i).ACCOUNT_TYPE_NUM = rtrim(v_rec(i).ACCOUNT_TYPE_NUM,,',') )

Upvotes: 1

Related Questions