Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have column like........


Customer and designation (column heading)
_____________________________________________

customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4Name
----------------------------------------------
customer5-Designation5,customer4-Designation4,customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4 ---> Second Colomn
----------------------------------------------
customer6-Designation6 ---> Third column
---------------------------------------------
-
----------------------------------------------
-
----------------------------------------------
-
-

so i want to get substring "customers" from each column.
can i have any string function and solution for this query.

Thank u .
Posted
Comments
Ganesan Senthilvel 9-Mar-12 4:54am    
have you tried substring SQL function?

1 solution

U can use:
1. Get the required substring in SQL query. Instead accessing table direcly write queries to access data in Source OLEDB if you are using OLEDB as source. Please do not use this if you use Excel as source.

or

2. Use Derived column and use string functions. A basic idea would be, find index of "-" and set as the length for substring to be resturned.

Thanks,

Kuthuparakkal
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900