How to trim values in sybase ase?

HI Team
I am using Sybase ASE15.7 version.
Below is the sample column values .

http://abc.lifeline.airs.com/support/
https://xyzbre.lifeline.airs.com/video/

Would like to know how to

  1. Trim http:// and https:// from above list of example
  2. Remove characters after first /
  3. Include only the abc and xyzbre from above two entries .
 
 abc
 xyzbre
 

Thanks

Hello Perlbaby,

Following may help you in same, I have tested it in BASH only.

awk -F'[/.]' '{print $3}'   Input_file

Thanks,
R. Singh

Thanks Ravinder

But I wanna run in Sybase SQL server using queries .
Can you help on this ?

Dear Perlbaby,

I have a few to questions pose in response first:-

  • Is this homework/assignment? There are specific forums for these.
  • What have you tried so far?
  • What output/errors do you get?
  • What are your preferred tools? (C, shell, perl, awk, etc.) You now are suggesting SQL, which would have been nice to know earlier
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)

Most importantly, What have you tried so far?

There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.

We're all here to learn and getting the relevant information will help us all.

Robin