|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Quote:
You need to explain more clearly and how you design your oracle database. |
|
#3
|
|||
|
|||
|
Quote:
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 |
|
#4
|
|||
|
|||
|
Quote:
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'; |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > How to use compare 2 URL's |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|