I have a variable ‘emp_name’, dynamic in length, which has the the employee’s name in the last, first format separated by a comma. What I want to do is to get the last name into a variable.
In SAS, I would have done
Lname=substr(emp_name,1,’,’) ;
I am not really sure how I’d do this using COGNOS BI and would appreciate any help I can get.
Try this....
substring(emp_name,1,position(',',emp_name))
Thanks,
Sridevi
Create a dataitem with the expression that Sridevi posted but add -1 to get rid of the comma (,) at the end
substring(emp_name,1,position(',',emp_name) -1)
Sridevi/Gopinath/et al:
Thank you. You people are great!!! That worked..
Regards
Kumar