Use DECODE, TRIM, SUBSTR?  Not Sure

Hi. I am attempting to extract the IP addresses out of the following three strings:
%PIX-5-304001: Accessed URL 170.171.250.20:/
%PIX-5-304001: Accessed URL 170.171.250.100:/
%PIX-5-304001: Denied Access URL 68.142.226.48:/
When I select x from table, i'd like to see:
170.171.250.20
170.171.250.20
68.142.226.48
The good news is that the IP address is always followed by a ":" and always begins after "URL(space)" I thought I could use SUBSTR but the start and end points are not always at the same place and the IP address are of varying length - although they always contain three (3) periods.
DECODE seems like it might be overkill and since there are thousands of unique address might be too much work (as far as I can tell). Are there wildcard options available for a LTRIM/RTRIM combination or am I looking at this issue the wrong way?
Thanks for any help pointing me in the right direction...

Dear all
I have a table having one field where the data are storing in the following way. the name of the field is vc_notify, in the one field there are al best 3 notify info may place. some times they put only one Notify using (i).
I want to seperate 3 notify in the diffenent column from one single SQL query.
the out put would be....
(i) METRO CASH & CARRY BULGARIA EOOD, KM 7-11, TZARIGRADSKO CHAUSSEE BLVD. BG - 1784 SOFIA, BULGARIA.
(ii) SCHENKER EOOD BOUL. LSKARSKO CHAUSSEE 7 BG - 1592 SOFIA, BULGARIA.
(iii) WILLI BETZ OOD & KO BG-BALKAN STAR, 1, SAMOKOVSKO CHAUSSEE, BG-1138 GORUBLJANE, SOFIA, BULGARIA.
NOTIFY_1                    NOTIFY_2                    NOTIFY_2
METRO CASH & CARRY BULGARIA EOOD,      SCHENKER EOOD BOUL. LSKARSKO CHAUSSEE     WILLI BETZ OOD & KO BG-BALKAN STAR,
KM 7-11, TZARIGRADSKO CHAUSSEE BLVD.      7 BG - 1592 SOFIA, BULGARIA.          1, SAMOKOVSKO CHAUSSEE, BG-1138 GORUBLJANE,
BG - 1784 SOFIA, BULGARIA.                                   SOFIA,BULGARIA.
what would be my sql command to retrive the data.
Farhad

Similar Messages

  • Got the following message when trying to install Photoshop CC "You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms." I use Windows Vista so not sure what I need to

    Hi there
    I got the following message when trying to install Photoshop CC, "You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms."
    I use Windows Vista so not sure what I need to do now! Any help would be much appreciated thanks.

    Photoshop CC only runs on Windows 7 or Windows 8/8.1. Not Vista.
    System requirements | Photoshop

  • Thinking of using Home Sharing. Not sure if I can or should.

    Hi. A few weeks back iTunes started asking me if I wanted to enable Home Sharing. I was curious but since I was unsure I haven't done it yet. Here's my deal, we have 2 Macs in the house and my stepdaughter synchs her iPod on our MacBook and she's fine with that. No one else does. On my PowerMac G4, however, I have profiles enabled and 3 of us synching our iPods on that. I've copied most of my library into my wife's and almost all of mine into my son's. So, if I'm not mistaken, if the size of my library is 10GB, we're using 30GB between us which seems very inefficient. My G4 has an 80GB HDD and I have a seperate, internal 250GB HDD. I'm not sure if this is what Home Sharing does but what I would, ideally, LIKE to do is locate my library on the 250GB drive, which I believe is possible, then enable home sharing so that me, my wife and my son all use the same library. If this is not what home sharing is for or not possible I apologize. I've done some searching and I don't see this particular issue addressed. Thanks.

    h8uthemost wrote:
    Hey guys,
    I'm interested in Arch Linux. So I want to throw it on a disc and give it a shot. If I like it, and it's lightweight and fast enough(I'm currently using Lubuntu, and I'm wanting to see if Arch is even lighter/faster), then I'll install it. But I was just reading the Wiki, and under the Pre-Installation part this is mentioned:
    Arch Linux is optimized for i686 and x86_64 processors and therefore will not run on any lower or incompatible generations of x86 CPUs (i386, i486 or i586). A Pentium Pro, Pentium II or AMD Athlon (K7) processor or higher is required.
    I have a seven year old computer, and I really don't know much about processors. So I'm not sure if I can run Arch. It looks like I have an AMD Athlon XP 2700+ processor. So going by this, am I able to use Arch? I've always download and used the i386 version of distros. And according to the wiki Arch is incompatible with this. So I'm guessing I can't run it, but I thought I would ask just to be sure.
    Thanks for any help.
    That processor is newer than the  Athlon K7 series. It is i686, and thus installling a i686 OS like Arch Linux will/should give you a faster computing experience.

  • How to use decode for a not = expression ?

    Hi ,
    i want to use in my seelct query decode( val1 , IF not = 'abc' , sum(val1)
    how can i express it as a not equal or even a >= in a decode ?
    kindly advise
    tks & rdgs

    hi ,
    i have used a function to resolve my issue
    tks for all the info
    rdgsYou would be better doing it all in SQL for performance reasons so you do not context switch between PL/SQL and SQL all the time...
    Ok, without using CASE...
    SQL> create table a (stupid_number_in_varchar  VARCHAR2(10));
    Table created.
    SQL> insert into a
      2  select '3' as stupid_number_in_varchar from dual union all
      3  select 'X' from dual union all
      4  select '4' from dual union all
      5  select 'X' from dual union all
      6  select '5' from dual;
    5 rows created.
    -- Strip out non numeric values...
    SQL> ed
    Wrote file afiedt.buf
      1  select decode(stupid_number_in_varchar, 'X', null, stupid_number_in_varchar) as mynum
      2* from a
    SQL> /
    MYNUM
    3
    4
    5
    -- Only take numbers >= 4 ...
    SQL> ed
    Wrote file afiedt.buf
      1  select decode(sign(mynum-4), -1, null, mynum)
      2  from (
      3       select decode(stupid_number_in_varchar, 'X', null, stupid_number_in_varchar) as mynum
      4       from a
      5*      )
    SQL> /
    DECODE(SIG
    4
    5
    -- Sum the result...
    SQL> ed
    Wrote file afiedt.buf
      1  select sum(mynum) from
      2  (
      3    select decode(sign(mynum-4), -1, null, mynum) mynum
      4    from (
      5         select decode(stupid_number_in_varchar, 'X', null, stupid_number_in_varchar) as mynum
      6         from a
      7         )
      8*   )
    SQL> /
    SUM(MYNUM)
             9
    SQL>

  • Missing right parenthesis using DECODE and SUBSTR

    Hello,
    Can anyone explain why I am getting missing right parenthesis when trying to execute this query
    INSERT INTO LOCATION_INFO
    (LOCATION,REGION)
    SELECT SUBSTR(OLD_SYSTEM_SITE_CODE,1,2),  DECODE(SUBSTR(OLD_SITE_SYSTEM_CODE, 1, 2), 'CA', CHICAGO,'TX', DALLAS, NEW YORK)
    FROM SITE_MAPPING_TABLE;Thanks for looking
    Mike

    INSERT INTO LOCATION_INFO
    (LOCATION,REGION)
    SELECT SUBSTR(OLD_SYSTEM_SITE_CODE,1,2),
           DECODE(SUBSTR(OLD_SITE_SYSTEM_CODE, 1, 2), 'CA', 'CHICAGO','TX', 'DALLAS', 'NEW YORK')
    FROM SITE_MAPPING_TABLE;i think the CHICAGO, DALLAS, and NEW YORK are character strings and should be enclosed in single quotes

  • How can i Use my apple 4 phone again - I was instructed to restore my phone with itunes and now it's stuck with the itunes logo and black screen Itunes has said unable to restore and now left unable to use my phone and not sure if I have any data on it?

    I was instructed by I Tunes to restore my Iphone 4 - ITunes has since said it is unable to restore.  I  am now left with a black screen with Itunes logo on it and a picture of the charger attachment at the base of the screen and I am unable to do anything now with the device.  I think I may have lost all of my information on the device too ~ can anyone help please?

    You have lost all your data, but hopefully you were backing it up with iCloud or iTunes. You can try this:
    Turn your phone off and connect your cable to the computer, but not the device just yet. Start up iTunes. Now, hold down the home button on your phone and plug it in to the cable - don't let go of the button until iTunes tells you it's detected a phone in recovery mode. Now you can restore to factory settings.

  • Trying to set up an apple id for my daughter but it says that the apple id already exists...but it shouldnt as she has been using my account! not sure how to solve this problem ??

    I have an apple id myself which my children share, i am trying to set up an apple id for my daughter but it says that the id already exists?? which it shouldnt!
    I have tried taking her Mac and ipod off my devices but it still wont let me set it up!! any ideas anyone??

    Hello, Wyseup. 
    Thank you for visiting Apple Support Communities.
    Most likely this email address has been attempted to be setup as an Apple ID at some point.  You can reset your Apple ID password via the steps in the first article below.  If you do not have access to the email account, need assistance or are not receiving the password reset link, see the second article.
    Apple ID: If you forget your password
    http://support.apple.com/kb/ht5787
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Cheers,
    Jason H.

  • I am being asked to upgrade my video player when I use Firefox, I'm not sure if this is legitimate. It has the Firefox logo, but that doesn't mean it's legit.

    http ://dlp.cloudsvr313.com/ qWBU_hpq3O-pSMvXTYrrEzMnKBCL11GjMGqJ5f4QgJFqP7jp7iSGEpUM-4li7pPxFtc02kRuBAIqXxbh7H5h7ExZKJuxfQPzLpQ3avIYivChRL8xbIUxam-objuqCwZF
    This is the link for the download.
    ''moderator broke the hyperlink for the executable download''

    That download isn't from Mozilla.
    See the Plugin Check page to see what plugins Mozilla think need to be updated. http://www.mozilla.com/en-US/plugincheck/

  • Built in ftp server, I want to use it, but do not think I can

    I enabled the ftp server, I want to use it, I am not sure it is up to the task.
    With it on, users can ftp in just fine, I set the ftp settings to log ftp users into their home directory. I plan on having 1000's of ftp users, and they do not all need to get home directories.
    I created a sharing only account, and changed their home path to /Library/WebServer/Documents/them
    I also changed their shell to /sbin/nologin
    This did not work, they were not allowed to login, nothing at all in the logs either.
    So I move to a standard user, and then they can login, as long as I do not change the shell they use. I do not want them to have ssh access.
    I ended up just hand configuring the ftp server, which means I am not going to be able to use Server Admin, or it will mess up my settings. I really do not want to create system users for ftp accounts anyway. Ideally, I could create ftp users with TLS, but I do not see that as an option, and OS X does not seem to be simple to set up ssh chroot, so that is not an option either.
    Suggestions on a shared hosting machine?

    Apple's implementation of lukemftp isn't very robust for hosting needs. They have spent little effort on crafting the GUI to support multiple accounts (via WGM) pointing to the same domain space, or paths within a sandbox (say you want to craft a second account to point to a subdirectory of a site --not with Apple's exceptionally primitive GUI in this regard). Apple also hasn't spent any effort to update their website for OS components: http://www.apple.com/opensource/, so this isn't really on their radar. Many hosting companies have begged Apple to address these issues ... going back many years. The results of their attentiveness is the product you now have.
    You should take a few minutes to post your wishes, and your disappointments, via the feedback tool within the Server Admin menu.
    Then follow Alex's suggestion to consider pureftpd.

  • When I click on an email address on a web page, a page no longer opens in my email program. Not sure if this is a problem due to Firefox or due to recent installation of Office 2010. I use a PC with Vista.

    When I click on an email address embedded in a web page, a page would open in my email program with this address in the "To" line. I recently installed Microsoft Office 2010 and now when I click on an email address nothing happens. I am not sure if this is due to Office 2010 or a Firefox problem. I use a PC with Vista.

    https://support.mozilla.org/en-US/kb/change-program-used-open-email-links

  • This is my first time using iphoto, I am trying to make a slide show that I can then burn to a dvd. The slide show is complete, but I'm not sure where to go now. Can I burn the slide show from iphoto or do I have to export to imovie or idvd?

    I have completed the slide show i am making, but not sure what to do now. I want to burn it to a dvd, but not sure if i can do that from iphoto or do i need to export to imovie or idvd? If i need to export, will iphoto save a copy in iphoto? This may be really stupid, but I don't see an obvious way to save my slide show in iphoto. Please Help!

    Export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best quality video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    If iDVD was not preinstalled on your Mac you'll have to obtain it by purchasing a copy of the iLife 09 disk from a 3rd party retailer like Amazon.com: ilife 09: Software or eBay.com.  Why, because iDVD (and iWeb) was discontinued by Apple over a year ago. 
    Why iLife 09 instead of 11?
    If you have to purchase an iLife disc in order to obtain the iDVD application remember that the iLife 11 disc only provides  themes from iDVD 5-7.  The Software Update no longer installs the earlier themes when starting from the iLIfe 11 disk nor do any of the iDVD 7 updaters available from the Apple Downloads website contain them. 
    Currently the only sure fire way to get all themes is to start with the iLife 09 disc:
    This shows the iDVD contents in the iLife 09 disc via Pacifist:
    You then can upgrade from iDVD 7.0.3 to iDVD 7.1.2 via the updaters at the Apple Downloads webpage.
    NOTE:  If you're running iPhoto 9.5 the export options will be different.
    OT

  • HT4352 Do u have to have a computer/pc to use home sharing? I have apple tv not sure if it's 2nd or 3rd generation or even if it's first generation. My laptop is broken and in the shop, can I not run my apple tv off my iPad?

    Do u have to have a computer/pc to use home sharing? I have apple tv not sure if it's 2nd or 3rd generation or even if it's first generation. My laptop is broken and in the shop, can I run my apple tv off my iPad?

    If you have home sharing turned on in the settings of your apple tv and your iPad you can AirPlay from your iPad to the apple tv. When you play a video there is a tv icon on the right side of the play/pause/fwd/rwd icons. Click that and choose your apple tv. Your apple tv and iPad must be on the same network.

  • I have an ipad 3/32GB..I need more storage and not sure how to make better use of icloud and release GB

    To add to my original question: I had a 1st generation ipad and 32GB was more than enough storage now I'm having trouble making movies, adding media, etc. I have bought another 15GB of storage on I cloud. Can I put all of my apps on i cloud?
    I'm going to be taking an overseas flight and wanted to rent a bunch of movies but I'm not sure how to do that.
    I would be grateful for any help
    sherrislp

    To answer your question, you could remove your apps and then download them again as needed. Your purchased apps are part of what is stored in iCloud and purchased apps do not count against the allotment anyway - As far as I know.
    You would want to backup to iCloud before you delete the apps. If it were me, I would also back up and sync with iTunes - I still use iTunes and I back up to both iCloud and iTunes.
    The suggestion that James made would be OK for bringing the movies with you on the trip .... But you need to be able to use WiFi in order to use the device and the way that I read your question, you want to download movies to watch on the flight. So that will not work on the airline flight. It would store the content for later viewing but won't work on the flight. That is my understanding of the GoFlex drive, but you would have to investigate it further.
    http://www.seagate.com/external-hard-drives/portable-hard-drives/wireless/goflex -satellite/?cmpid=ppc-_-satellite-_-g-_-us-_-goflex_satellite-_-p

  • If I use the same iCloud account for my ipad and iPhone, will changes I make on one change on the other as well?  I'm not sure of the advantage of using teh same iCloud for both devices.

    If I use the same iCloud account for my ipad and iPhone, will changes I make on one change on the other as well?  I'm not sure of the advantage of using teh same iCloud for both devices.

    No, it only mirrors changes to synced data.  This includes mail, contacts, calendars, reminders, safari bookmarks, notes, iWork documents and data, and photo stream photos (assuming you choose to sync all this data).  Changes to iTunes data such as music, apps, podcasts, etc., are not synced using iCloud.  In your example, if you delete an app from one device it will remain on the other until deleted there too.

  • I received a text today while at work about iCloud keychain verification code. I have not signed up for it or anything that uses it. I work out of the city with limited internet access so not sure why I would be getting this. Is my info safe??

    I received a text today while at work about iCloud keychain verification code. I have not signed up for it or anything that uses it. I work out of the city with limited internet access so not sure why I would be getting this. I only got this number about a month ago. Apparently someone else had the number before because I get texts from his family members wondering whats going on. I got one yesterday and the person didn't seem to thrilled that the number was cutoff and today I got 2 texts about iCloud Keychain which I don't even know what it is. Seems suspicious to me. If the person who use to own the number is doing it he should know it is not his number anymore because he obviously didn't pay his bills.  I'm not too sure about iCloud Keychain so just want to know my info safe?? It says it can store credit card numbers which is what gets me worried. Frankly I think it's pretty stupid to save that kind if information with any kind of app. But I don't want some random person trying to access my personal information because they are bitter they lost their number.  Please let me know as soon as possible so I can change passwords or anything that is needed.
    thanks

    If it were me, I would go to my carrier and get a new number. Since you have only had it for a month, the inconvenience would be minimal.
    Barry

Maybe you are looking for