Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old April 12th, 2008, 02:31 AM
smitanaik smitanaik is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 27 smitanaik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 28 m 30 sec
Reputation Power: 0
How to use compare 2 URL's

www.rediff.com
www.rediffmail.com

i want to compare this url and convert them into 1

i.e any url containing rediff word i want to convert that url into www.rediff.com

help me out

Reply With Quote
  #2  
Old April 13th, 2008, 09:04 AM
vpire vpire is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 150 vpire User rank is Corporal (100 - 500 Reputation Level)vpire User rank is Corporal (100 - 500 Reputation Level)vpire User rank is Corporal (100 - 500 Reputation Level)vpire User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 6 h 56 m 44 sec
Reputation Power: 6
Quote:
Originally Posted by smitanaik
www.rediff.com
www.rediffmail.com

i want to compare this url and convert them into 1

i.e any url containing rediff word i want to convert that url into www.rediff.com

help me out


You need to explain more clearly and how you design your oracle database.

Reply With Quote
  #3  
Old April 14th, 2008, 10:47 PM
smitanaik smitanaik is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 27 smitanaik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 28 m 30 sec
Reputation Power: 0
Quote:
Originally Posted by vpire
You need to explain more clearly and how you design your oracle database.



actually i want to display first 50 sites along with data downloaded from those sites. the fields in my database are URL, datareceived.

most of the time sites are duplicated so i want to make them one. if www.rediff.com is appearing twice i am able to make it as 1.
but when URL contains rediff word how to convert it into www.rediff.com

say i have 2 sites
1)www.rediff.com
2)www.rediffmail.com

i want to make it into 1 url say www.rediff.com

Reply With Quote
  #4  
Old April 14th, 2008, 11:03 PM
vpire vpire is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 150 vpire User rank is Corporal (100 - 500 Reputation Level)vpire User rank is Corporal (100 - 500 Reputation Level)vpire User rank is Corporal (100 - 500 Reputation Level)vpire User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 6 h 56 m 44 sec
Reputation Power: 6
Quote:
Originally Posted by smitanaik
actually i want to display first 50 sites along with data downloaded from those sites. the fields in my database are URL, datareceived.

most of the time sites are duplicated so i want to make them one. if www.rediff.com is appearing twice i am able to make it as 1.
but when URL contains rediff word how to convert it into www.rediff.com

say i have 2 sites
1)www.rediff.com
2)www.rediffmail.com

i want to make it into 1 url say www.rediff.com


I still kind of lost about what you want to achieve, but I give you an example below and see whether this is what you want
Code:
SELECT decode(url, 'www.rediff.com', 'www.rediff.com',
                           'www.rediffmail.com', 'www.rediff.com') url_result FROM your_table;


The above decode statement is equivalent to the following if-then-else statement:
Code:
IF url = www.rediff.com THEN
   url_result:='www.rediff.com';
ELSIF url = www.rediffmail.com THEN
   url_result:='www.rediff.com';

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > How to use compare 2 URL's


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway