9.2 database can SQL desired output achived more simple and effective way?

Hi,
In a table I am having one column with varchar2(1000) storing data for e.g.
!!:FA:/Field Value A1!!:FB:/Field Value of B1!!:FC:/Field Value of C1!!:FD:/Field Value of D1!!:FE:/Field Value of E1!!
!!:FA:/Field Value of A2:FE:/Field Value of E2!!
!!:FC:/Field Value of C3!!:FD:/Field Value of D3!!:FE:/Field Value of E3!!
!!::FE:/Field Value of E4!!
!!:FA:/Field Value A5!!
I want output in following way
I want to seperate this data and print it in columnar format
FA               FB               FC               FD               FE
Field Value of A1     Field Value of B1     Field Value of C1     Field Value of D1     Field Value of E1
Field Value of A2                                                  Field Value of E2
               Field Value of C3     Field Value of D3                    Field Value of E3
                                                            Field Value of E4
Filed value of A5                    
( Indenting is not coming properly so I am putting small example )
fa fb fc fd fe
a1 b1 c1 d1 e1
a2 e2
c3 d3 e3
e4
a5
In short, variable length of data to be broken into columnar format. Column starting identification !!:FA:/ and column ending identification is next "!!" character. I have achived this by something like
case when instr(message, '!!:FA:/') > 0 then
substr(message,instr(message, '!!:FA/:')+7, (instr(message,'!!',instr(message, '!!:FA:/')+7) -
(instr(message, '!!:FA:/')+7)))
end FA,
In 9.2 database can it be achived by more simple way ? ( In my actual table data is more complex and lot of fields ).
thanks & regards
paragjp

Well, the following solution is hardly elegant and you will need to have as many columns as the maximum number items that can appear in a single string, but you can try...
create table chartab (charcol varchar2(200));
insert into chartab values ('!!:FA:/Field Value of A1!!:FB:/Field Value of B1!!:FC:/Field Value of C1!!:FD:/Field Value of D1!!:FE:/Field Value of E1!!');
insert into chartab values ('!!:FA:/Field Value of A2!!:FE:/Field Value of E2!!');
insert into chartab values ('!!:FC:/Field Value of C3!!:FD:/Field Value of D3!!:FE:/Field Value of E3!!');
insert into chartab values ('!!:FE:/Field Value of E4!!');
insert into chartab values ('!!:FA:/Field Value of A5!!');
commit;
column shortchar1 format a17;
column shortchar2 format a17;
column shortchar3 format a17;
column shortchar4 format a17;
column shortchar5 format a17;
SELECT substr(charcol,instr(charcol,'!!',1,1)+7,instr(charcol,'!!',1,2) - instr(charcol,'!!',1,1)-7) shortchar1,
       substr(charcol,instr(charcol,'!!',1,2)+7,instr(charcol,'!!',1,3) - instr(charcol,'!!',1,2)-7) shortchar2,
       substr(charcol,instr(charcol,'!!',1,3)+7,instr(charcol,'!!',1,4) - instr(charcol,'!!',1,3)-7) shortchar3,
       substr(charcol,instr(charcol,'!!',1,4)+7,instr(charcol,'!!',1,5) - instr(charcol,'!!',1,4)-7) shortchar4,
       substr(charcol,instr(charcol,'!!',1,5)+7,instr(charcol,'!!',1,6) - instr(charcol,'!!',1,5)-7) shortchar5
FROM   chartab;
SHORTCHAR1        SHORTCHAR2        SHORTCHAR3        SHORTCHAR4        SHORTCHAR5
Field Value of A1 Field Value of B1 Field Value of C1 Field Value of D1 Field Value of E1
Field Value of A2 Field Value of E2
Field Value of C3 Field Value of D3 Field Value of E3
Field Value of E4
Field Value of A5Greg Pike
http://www.singlequery.com

Similar Messages

  • Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    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 qualty 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 retailier 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.
    OT

  • I want to change my plan from Photoshop to the student version of Creative Cloud - I can't get anyone through live chat and no way of contacting customer support. Help please?

    I want to change my plan from Photoshop to the student version of Creative Cloud - I can't get anyone through live chat and no way of contacting customer support. Does anyone know how to contact adobe?

    Hi Beansy21,
    Please refer to the link below to contact the customer support:
    http://helpx.adobe.com/contact.html
    Regards,
    Sheena

  • Can too large a folder cause issues and effect performace of my Mac Pro

    Hi, I have a 180 gb folder filled with important data within my Home folder. This folder has a many subfolders as well. The folder is on my startup drive and where I have Snow Leopard installed. Can too large a folder cause issues with my mac and effect performance? Thanks

    another way to ask, would you make better use of, and improve I/O and performance, if you used your other drive bays? yes.
    Boot drives with even less than 50% free is probably not a good idea. All depends on whether 200GB is on 1TB or on 500GB drive. And how fragmented free space even.
    Lifting, loading and writing or copying 4GB files of course does have an impact, so if you work with 2GB files in CS5....
    Having a dedicated type boot drive, media drive (and isolate media and library files) as well as scratch drive is normally done with Mac Pro.
    The biggest bang in performance: lean mean SSD boot drive.

  • How can i get more sounds and effects in garageband?

    if you can help me please be specific im not very computer oriented.thx

    An easy way to extend GarageBand with man more loops and instruments would be to buy Mainstage 2 as well. This will install all GarageBand JamPacks in a way that they are available in GarageBand and Logic as well, see: http://www.apple.com/de/logicpro/mainstage/
    The price at the AppStore  is really a bargain, only 23,99€ (about 30$ US), much less than a single of the JamPacks used to cost.
    Or see this post by HangTime for a link to free sound files:
    Re: Jam Pack loops question 
    Regards
    Léonie

  • Can SQL injection output rows to hacker?

    Can a hacker retrieve rows through SQL injection or simply
    just jumble up the data? I wouldn't see how they could get the rows
    without coldfusion code that will actually be instructed to output
    the query. If not, are there any hot cf/mssql hacking techniques to
    steal database rows?

    chazman113 wrote:
    > Can a hacker retrieve rows through SQL injection
    Yes, yes they can.
    You are correct that there would need to be code to output
    the data.
    The hackers just use the code you already have built to
    output data.
    But then use SQL injection tricks to output more data then
    the developer
    intended for anybody to see.
    Here is a blog that describe a real life example of just
    that.
    http://thedailywtf.com/Articles/Oklahoma-Leaks-Tens-of-Thousands-of-Social-Security-Number s,-Other-Sensitive-Data.aspx

  • Wife and I have separate iOS devices, separate iCloud accounts. But we both want to access mail from the iMac (OSX Mavericks.) Currently only my mail is linked. How to configure so that wife's iCloud mail can be seen  on iMac. Simple and explicit please!

    My wife and I have separate ioS devices (iOS7)  with separate iCloud accounts.
    So we access our mail separately on these devices. But we would both like to be able to access mail at the desk top (iMac, OSX Mavericks). Currently only my mail is linked. How do I set up the Mac to allow it to access my wife's e-mail too, either in the same mail inbox or a separate one. Simple instructions please!

    If Mail in Mavericks is the same as earlier versions you can select accounts in the sidebar, so that you can either display the inboxes for individual accounts, or the contents of all the account inboxes. (If the accounts don't show click the disclosure triangle next to 'INBOX'). The layout may have changed since the version I have - Snow Leopard - but you should be able to do the same thing.

  • How can I activate the option amp design and effect in Garageband 10.0.1?

    Please!!, My Garageband 10.0.1 has not activate the amp design and effect:
    I press the option but in not activate.
    Help me please!!!
    Thanks

    Just a hunch, but have you an electrick guitar track selected? The amp designer will not work for other audio tracks, it has to be an electric guitar track:
    Regards
    Léonie

  • Cannot connect to database using SQL Developer

    Ok. Here are the facts:
    1) I can connect to the database using PL/SQL Developer.
    2) I wanted to try SQL Developer and I am unable to connect to the same database with SQL Developer. I provide username and password and select "network alias" and click test and I get "Network adaptor could not be established"
    3) TNS names.ora file resides on a mapped drive which clearly is accessible by PL/SQL developer but not by SQL developer.
    What am i missing?
    Thanks a lot

    If you can select a network alias, then sqldeveloper has found your tnsnames and the problem lies elsewhere.
    Is the network drive specified by a UNC? SQLDeveloper doesn't work well with unc names.

  • How can detect that cdrom drive were opened and closed?

    How can detect that cdrom drive were opened and closed?

    I'm sure there are more elegant and complicated ways to accomplish this using Windows SDK function calls to kernel32.dll or something extravagant like that, but if you want the bare-bones easy way to check if the CD-ROM tray is currently opened, then simply use System Exec to query the CD-ROM drive from the command line. One example of this is shown below.
    Use the command line function cmd /c d:, where d: is your CD-ROM drive. If the Standard Error output from System Exec.vi is "The device is not ready." followed by a carraige return and line feed, then voila, your CD-ROM drive is open. If not, it's closed. Anyone have a better idea? I'm sure one exists...
    Message Edited by Jarrod S. on 02-16-2006 12:23 PM
    Jarrod S.
    National Instruments
    Attachments:
    CDROM_Check.JPG ‏22 KB

  • Can I connect an externa hard drive and access files from 2 or more computers wirelessly?

    Is there a way to connect an external hard drive to my linksys modem and access the files wirelessly by 2 or more computers?
    I have a wireless G wrt54G modem working on windows XP a desktop and laptop on my home system. I have a WD “my book” external hard drive with a usb interface. My modem does not have a USB interface.
    At work I also have 4 laptops  using XP and vista and looking to have them all access an external hard drive and printers. I have not selected a hard drive for the work system.
    If yes can I add 2 or more printers and print form all connected computers?
    If yes, is it possible to access the files of the external hard drive (home system) via the internet?
    Thanks in advance for all your help

    First, your WRT54G is a router, not a modem. Different function.
    Yes, you can  "connect an external hard drive... and access the files wirelessly by 2 or more computers," just not that external hard drive. You need one that supports network attachment, with an ethernet connection.
    And you can print to printers from various computer, again if the printers are made to support that.
    The answer to your last question is maybe. Oh, it's definitely possible, but may require learning about static IP addresses, dynamic DNS, firewalls, port forwarding, file sharing...

  • How Can I import Fonts and Effects?

    Hi. My partner and I both have Macs and both have FCP. I have FCP 6 while my partner has FCP5. However she appears to have more fonts and effects than I do. This means that when she does an edit that I then open in 6 I can't 'read' her effects or fonts. Is there a way to copy her fonts and effects onto my FCP6? Thanks. Ric

    Fonts...yes. Have her look in her FONTS FOLDER and give you what you don't have.
    EFFECTS? Well, she can tell you what she has, and if they are free, you can get them for free (Too Much Too Soon, Eureka, a few Sheffield Softworks, CGM...). If they are ones that cost money, then you either need to buy them, or she needs to stop using them if you are going to continue to collaborate.
    Shane

  • Creating PL/SQL function in SQL plus which will display desired output

    Hello PL/SQL experts,
    I am not skilled on PL/SQL so want you help for one of the PL/SQL requirement.
    Requirement: We have a database purge jobs which deletes the records from our application database on daily basis. Our Client wants a verification PL/SQL to be created which they will run pre and post the purge job to identify the number of records deleted/processed by purge job. It should do a SELECT operation and find out the number of records in table based on the where clause and give the output to the user.
    The result of PL/SQL should be something like this (considering the PL/SQL is processing multiple select statements):
    ****Verification SQL Start*****
    30 records from table S_SRV_REQUEST selected
    45 records from table S_SRV_REQUEST_X selected
    15 records from table S_SRV_REQUEST_XM selected
    *****Verification SQL complete*****
    For this I am thinking of a simple PL/SQL which will diplay the count of records from each table but I am not sure how to display the count on screen as an output. Can I request PL/SQL experts to put some light on this?
    Regards
    Sumit

    PL/SQL is a server side process running on your database server.  It is not connected to a display or a keyboard, so cannot output any results from within the code itself.
    What you need is a client application that the user can run which will query the database, or call procedure(s) to get results and then the client application will display those results appropriately.
    One of the simplest client tools you can use to build such a user-friendly application is Oracle Application Express (APEX).
    Bear in mind that if you're going to 'identify' record for deletion prior to actually deleting them, then you may also have a need to store the keys of those identified records somewhere so that only those records are deleted.  Consider the situation where the user requests the information and the application queries the records to say there are 30 records from S_SRV_REQUEST with the correct criteria to be deleted.  By the time the user confirms they are happy and want the records deleted, some other record(s) may have been updated and also meet the criteria, so just doing a delete based on the criteria itself could result in more than 30 records being deleted.  However if you've identified the records and marked them in some way for deletion or stored the keys of those records on a queue somewhere to indicate the ones to be deleted, then your actual deletion process can just deal with those records and ignore any that have met the criteria since that time.  Of course that depends on your individual requirements, but it's something to bear in mind.

  • Can we use different Databases (Oracle & SQL Server) in one report?

    Post Author: venki5star
    CA Forum: .NET
    Hi there.
    Can we use different databases (Oracle & SQL Server) in a same report?
    If possible how?
    Another question,
    Can we change the Provider Name at runtime of the given report. If so the above question is useless...
    Thanks in Advance.

    I tried this using Oracle Provider for OLEDB (the one that supplied by Oracle Client) and Crystal Reports 9. you can drag the column into designer but the image does not appear in preview.
    I guess it's because CR does not recognized it as image, and there are no information that the blob data is an image at all.

  • Can I put a SQL query into a bind variable and then use it to output report

    Hi,
    Can I put a SQL query into a bind variable and then use it to output report?
    I want to create a report and an item "text area" (say P1_TEXT) which can let user to input a SQL query(they are all technical users and knows SQL very well). Then, I use a bind variable (that text area) to store the SQL statement. Then, I add a submit button and I want to use the following to output the report:
    select * from (:P1_TEXT);
    Do you think it is possible to do that? Any known limitations for APEX in this area?
    Thanks a lot,
    Angela

    You can, but make sure it's what you really want to do. Make sure you are VERY familiar with SQL Injection. Most people who know what it is, go out of their way to prevent SQL Injection. You're going out of your way to allow it.
    You can try using &P1_TEXT. instead of bind variable syntax. Bind variables are one of the best ways to prevent SQL Injection, which is why it's not working for you.
    Once again, I strongly urge you to consider the implications of your app, but this suggestion should get it working.
    Tyler

Maybe you are looking for

  • CMYK ICC profile support in Lightroom: Workaround?

    Ok, I know this is not the first time someone has brought this up and I know that Lightroom doesn't internally support CMYK printer profiles, and I'm not expecting it to do that given that the documentation specifically says it doesn't work, and it i

  • Unable to import software component version in IR

    Why i can't import software component version in IR by Tools->Transfer from SLD->import software component version? error message is "Unable to determine dependencies of software component version" i just create it in SLD before, anything else need t

  • Syntax error on token "class", invalid Expression

    Hai, i am new to java beans and i have written the following code which gives an error Code jsp: <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Tra

  • Better Materialized View support in 11g?

    We are using materialized views as a work-around to improve performance on versioned tables with spatial data and would like to know if there will be improved support in 11g. Currently we have to do a complete refresh but would like to use options li

  • Unable to create outbound delivery using transaction VL10B

    Hello, When I am trying to create an outbound delivery from refrencing a Purchase Order using transaction VL10B, the item is not getting selected (In the VL10B , I entered the PO number and executed but in the next screen no items are displayed ). Pl