List:General Discussion« Previous MessageNext Message »
From:walter Date:July 13 2011 1:55pm
Subject:Re: How to Shuffle data
View as plain text  
What you want to do is not shuffle, but reverse the domain order, starting
from the TLD (top level domain). You may pick the string functions you
need from the string functions page of the manual, but the problem is that
there may be any number of subdomains, so that in principle you would need
a loop construct. If I were in your position, I wouldn't use MySQL to do
this.
ciao
Walter

> Dear all,
>
> I have million of sites stored in url column of a mysql table.
>
> Some few examples are :-
>
> www.facebook.com/home
>
> adelaide.yourguide.com/news/local/news/entertainment/cd-review-day-and-age-the-killers/1401702.aspx
> abclive.in/abclive_business/2393.html
> abclive.in/abclive_business/assocham_manufacturing_companies.html
> abclive.in/abclive_business/b-ramalinga-raju-satyam-financial-irregularities.html
> aktualne.centrum.cz/report/krimi/clanek.phtml?id=635342
> aktualne.centrum.cz/report/krimi/clanek.phtml?id=635306
>
> I want to take the output in a tsv file the sites url in the below forms :
>
> com.faebook.com/home
>
> com.yourguide.adelaide/news/local/news/entertainment/cd-review-day-and-age-the-killers/1401702.aspx
> in.abclive/abclive_business/2393.html
> in.abclive/abclive_business/assocham_manufacturing_companies.html
> in.abclive/abclive_business/b-ramalinga-raju-satyam-financial-irregularities.html
> cz.centrum.aktualne/report/krimi/clanek.phtml?id=635306
> cz.centrum.aktualne/report/krimi/clanek.phtml?id=635342
>
> I need to shuffle the . words . Is there any in built function in mysql
> to achieve this.
>
> Thanks
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
>


Thread
How to Shuffle dataAdarsh Sharma13 Jul
  • Re: How to Shuffle dataReindl Harald13 Jul
  • Re: How to Shuffle datawalter13 Jul
    • Re: How to Shuffle dataAdarsh Sharma13 Jul
      • RE: How to Shuffle dataJerry Schwartz14 Jul
        • Re: How to Shuffle datashawn wilson14 Jul
      • Re: How to Shuffle datahsv15 Jul
  • Re: How to Shuffle datahsv13 Jul
  • Re: How to Shuffle datashawn wilson14 Jul
  • Re: How to Shuffle dataRaj Shekhar14 Jul