Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replace a string in Impromtu report

Status
Not open for further replies.

12345pn

MIS
Mar 24, 2005
1
US
I need to replace a column's values with lables and insert a commas between space and i am using Sybase as a database which does not have replace function. Is there a better anyway to do it without hard coding?

For example: Here's my situation:
A column 'Benefit' has the following values which separate by space in the Sybase database table:

Employee Plan Industry Union Part_time Full_time
Employee Plan Industry Union Part_time
Employee Plan Industry Union
Employee Plan Industry
Employee Plan
Employee
Health_type Contribution Insurance_Type Life_Insurance
Health_type Contribution Insurance_Type
Health_type Contribution
Health_type
alt_std_type ind_2digit region multi_plan
alt_std_type ind_2digit region
alt_std_type ind_2digit
alt_std_type
.
.

All above values need to replace with a lable and insert a commas between spaces like below:
Employee Plan Industry Union Part_time Full_time -->This string needs to replace like this (Empl, Pla, Ind, U, PT, FT)

Thank you in advance for helping me in this problem.

Regards,

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top