BookmarkSubscribeRSS Feed
RameshReddy
Calcite | Level 5

Hi,

can any one help me out on this

one datastet is there with names column

names

ramesh S/o bhoomareddy

w/o ramesh

sony d/o suresh

ramesh alias don

so from this i want to  retrive name  before special characters like S/o, W/o, alias

Thanks in advance

2 REPLIES 2
kassimorra
Calcite | Level 5

Hello,

For you use special names, you have to put it inside single commas and N at the end.

Ex:  'rammesh S/o bhoomareddy'n.

Here is an example with your names.

data teste;

        'ramesh S/o bhoomareddy'n = 1;

        'w/o ramesh'n = 2;

        'sony d/o suresh'n = 3;

        'ramesh alias don'n = 4;

run;

proc sql;

    select 'w/o ramesh'n from teste;

quit;

Tell me if it works !

Regards,

Kassim

art297
Opal | Level 21

It would help if you provide the way you want the resulting file to look.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 776 views
  • 0 likes
  • 3 in conversation