Data saved with a colon, how to read it?

Hello,
I have a report in ApEx with a multiple selection box. When I make more than one selection, it will save the data seperated with a colon. In my table it will look like this:
ID NAME SHR_ID_FROM
1 TEST 1:3
Where in the selection column the two values are stored. These numbers are linked to a name somewhere else in the database. When I have only one selection, there is no error and the name is given correctly. The report will then look like this:
ID NAME SHR_ID_FROM
1 TEST SELECTION1
When I have more than one selection and data is saved with colon, I cannot get the report to give me the data I need. It will give the ORA-01722: Invalid Number error.
I want the report to give me the following:
ID NAME SHR_ID_FROM
1 TEST SELECTION1(linked to number 1), SELECTION3(linked to selection 3)
So it has to give all selections. I am using the following SQL code to view the report
SELECT
"SRR_SERVICES"."ID" "ID",
"SRR_SERVICES"."NAME" "NAME",
(select "SRR_RQH"."NAME"
from "SRR_RQH"
where "SRR_RQH"."ID" = "SRR_SERVICES"."SHR_ID_FROM"
) as "ServiceHandler Van",
...... - rest of code -
I think the error lies in this line:
where "SRR_RQH"."ID" = "SRR_SERVICES"."SHR_ID_FROM"
And I believe the solution should be something like I have to split each number, remove the colon and make sure it is send to the report with the use of a comma to seperate each name. But my sql knowledge is not very good, so I have no clue on how to solve this issue.
Thanks,
Wijnand
Edited by: user8726418 on 15-sep-2010 1:38

Your design to store multiple values in the same column will require a lot of work to maintain. To access the different values you will have to parse out each one and compare it to the join column using some compicated function calls. It should be easier to use multiple columns for multiple values and hard-code the table joins using outer joins if necessary - but this can work only if you have a very small list of multiple values.
A cleaner approach might be to create a relation with the multiple values and use table joins to put the data together, such as (untested)
ID1 NAME SHR_ID_FROM
1   TEST 1:3
ID1 SHR_ID_FROM
1  1
1  3
ID2 DESCRIPTION
1  TEST SELECTION1
3   SELECTION3Your query would join the first to the second by ID1in both tables and SHR_ID_FROM to ID2 in the second and third tables.
BTW, to avoid confusion you could give "ID" a more meaningful name like "entity_id" or "description_id"

Similar Messages

  • I restored my iPad and then repurchased App Pages. But I am not able to find my data saved with Pages before the restore. qwn

    I restored my iPad and then repurchased App Pages. But I am not able to find my data saved with Pages before the restore. qwn

    Those sites take a long time to load for me (almost a minute)
    Reload web page(s) and bypass the cache.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Cmd + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"

  • WAD template with BSP Application - how to read selection screen values

    Hello,
    I've created Web template with Web Application Designer (WAD).
    I would like to extend  that page with BSP Application...
    Purpuse of this application is to read some information from tables
    on BW transaction server and display them within Web page.
    Question: How to read selection screen values from a Web template ?
    Thanks for any help,
    Pawel Borowiec

    Hi,
    The selection screen parameters will be on an inputField, so try and get the is of the inputfield generated by doing View source...
    And once you get the inputfield Id, you can read the value in the InputField(InF) by
    using the following code...!
    data : if_value type ref to cl_htmlb_inputfield.
    data : variable type string.
    if_value ?= cl_htmlb_manager=>get_data( request = request
                                                name    = 'inputField'
                                                id      = 'InF_ID_here'
           if if_value->value is not initial.
             variable  = if_value->value.
           endif.
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • A date column, with timestamp..how to remove timestamp

    Hi,
    I have a table name CATCH, with one of its fieldnamed DATE, using DATE datatype.
    The date format incudes timestamp,can anyone help me how to remove the timestamp part.
    I only want the date part only. I have tried this:
    Update CATCH set DATE=to_char(date,'DD-MON-YYYY');
    but the result of all the date inside the table still having timestamp.
    then i use this:
    Update CATCH set DATE=to_date(date,'DD-MON-YYYY');
    and the result still the same.
    Can anyone advice on this? pls.
    Thanks

    user9353110 wrote:
    Thank you very much..if thats the case, can we remove the timestamp when creating view for this table?no, you can never remove the time component of a DATE.
    If you don't want to show the time for a date (display purposes only!), use TO_CHAR to "transform" the DATE to a string with the appropriate format mask
    SQL> alter session set nls_date_format = 'dd-mm-yyyy hh24:mi'
      2  /
    Session altered.
    SQL> select sysdate
      2    from dual
      3  /
    SYSDATE
    17-03-2010 09:28
    SQL> select to_char (sysdate, 'dd-Mon-yyyy')
      2    from dual
      3  /
    TO_CHAR(SYSDATE,'
    17-Mar-2010
    SQL> select to_char (sysdate, 'yyyy-MON-dd')
      2    from dual
      3  /
    TO_CHAR(SYSDATE,'
    2010-MAR-17
    SQL> NOTE: the last two example are not DATEs! They are STRING

  • Please help! my little sister deleted all content and settings from my iphone,i did not get the data saved on my itunes,how can i instal an other version .

    I Just see a dead face on the screen i cannot do anything on my iphone and my laptop doesn't recognize the iphone when i connect it to the laptop.

    Force the phone into recovery mode & restore from your most recent backup:
    Turn your phone off. Leave the USB cable connected to your computer, but NOT your phone, iTunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new. Follow this by syncing your content back to your phone.

  • How to read the data from XML file and insert into oracle DB

    Hi All,
    I have below require ment.
    I will receive data in the XML file. then i need to read that data and insert into oracle tables. please let me know how this can be handled.
    Many Thanks.

    Sounds a lot like this question, only with less details.
    how to read data from XML  variable and insert into table variable
    We can only help if you provide us details to help as we cannot see what you are doing and only know what you tell us.  Plenty of examples abound on the forums that cover the topics you seek as well.

  • Howto call custom Oracel Data Type with TopLink?

    Hello,
    in our DB we have a custom Oracle type and a PL/SQL method which uses it.
    I would like to call the Oracle data type with TopLink. How can I do this?
    I could not find any documentation on this.
    I know JPublisher can do this but I don't want to use it!
    Please see code below
    cheers,
    Pete
    **************Datatype********************************
    CREATE TYPE My_Sub_Object AS OBJECT (Sub_Object_ID Number,
    Sub_Object_Txt VARCHAR2(200));
    CREATE TYPE My_Sub_Objects AS VARRAY (20) OF My_Sub_Object;
    CREATE TYPE My_object AS OBJECT (Object_id Number,
    Object_txt VARCHAR2(200),
    Sub_Objects My_Sub_Objects);
    ************PL/SQL-Method*****************************
    CREATE OR REPLACE PROCEDURE My_object_pro
    (Item_Object out My_Object) is
    Item_Sub_Object My_Sub_Object;
    Item_Sub_Objects My_Sub_Objects;
    Begin
    Item_Sub_Object := My_Sub_Object(10, 'Sub Object 10');
    Item_Sub_Objects := My_Sub_Objects(Item_Sub_Object);
    Item_Sub_Objects.Extend;
    Item_Sub_Object := My_Sub_Object(11, 'Sub Object 11');
    Item_Sub_Objects(2) := Item_Sub_Object;
    Item_Object := My_Object(1, 'Object', Item_Sub_Objects);
    End;
    /

    Object types and Varrays can be used from TopLink stored procedure calls. There was some support for this in 10.1.3, but the support in 11g (preview) is much better. You can also access the JDBC connection from TopLink or your DataSource and use JDBC directly.
    In TopLink 11g you can use an ObjectRelationalDescriptor to map the Object type to a Java class, and use this class as the argument type in your StoredProcedureCall.
    PL/SQL types are more difficult as they are not supported by JDBC, but your example only includes object types. If you had PL/SQL types you would need to wrap the types in object types, or use a PL/SQL block to convert them. TopLink 11g (preview 3) should have support for these as well.

  • How to read Chinese language in vb6.0

    Hi,
    I have ini file with chinese characters how to read and display in vb6.

    Hi,
     This forum is for VB.NET. If you have a question about VB6 then you should use one of the forums that still support VB6. Below is some links to 2 of them.
    http://vbcity.com/forums/26.aspx
    http://www.vbforums.com/forumdisplay.php?1-Visual-Basic-6-and-Earlier

  • How do i save a calender i have created with the photo and the dates saved on separate pages?

    how do i save a calender i have created in photoshop with the photo and the dates saved as two separate pages?  when i save as pdf or jpeg they are authomatically saving 1 pg with the photo and dates on one page.  This is causing problems when i print.

    Hi there, in case your printer cannot print very large, you can also crop down two versions and print them as separate documents.
    1) Create a guide where you would like to split the pages by clicking on the ruler (hit command R if they are not showing) and dragging to the desired area.
    Creating the guide will make it so you can be precise in the way you split up your page, and so that no part of the image will be repeated or lost.
    2) Select the Crop Tool and fit the crop area to the top half of your calendar, using the guide you've just made to snap to the right spot. Hit return to finalize the crop.
    3) Go to File > Save As. Name the file something like calendar_top and select the desired file format. Hit "Save."
    4) Once you get back to your calendar file, Go to the History panel and select "Drag Guide." This will take you back to the step before you cropped the image.
    5) Repeat the steps as before for the bottom half of the calendar, once again using the guide to help you make your crop area.
    So then you would just print each of the two pages individually. The images will not be contained within one document, but if you have Acrobat you could combine the files.
    I hope this helps!

  • How to read the data from a file in another computer with user name and password login

    How to read read the data from a file in anohter computer which need to login with user name and password?

    duplicate post:  http://forums.ni.com/t5/LabVIEW/log-on-the-other-computer-with-user-name-and-password/m-p/2061478
    duplicate post:  http://forums.ni.com/t5/LabVIEW/do-need-to-enter-the-user-name-and-password-when-TCP-ip/m-p/2061612
    duplicate post   http://forums.ni.com/t5/LabVIEW/log-on-the-other-computer-with-user-name-and-password/m-p/2060682

  • My daughter had completed a chart in pages. I saved it and then clicked on other chart types. Now I can't go back to the original chart she made even though I have not re-saved the file. How can I go back to her original chart with data?

    My daughter had completed a chart in pages. I saved it and then clicked on other chart types. Now I can't go back to the original chart she made even though I have not re-saved the file. How can I go back to her original chart with data?

    I don't get what you are saying.
    Is this all the same document?
    What version of Pages?
    Have you tried to revert to a previous version?
    Peter

  • My optical drive will not read any music cds now or recognize a blank cd in the drive. it might read some data discs. what is wrong with it and how do i fix it?

    My optical drive will not read any music cds or recognize a blank cd. it might read some data cds. what is wrong with it and how can i fix it?

    The optics might be dirty. Try running a cleaning CD through it and see if that makes a difference.
    If not, it will have to be replace.
    Allan

  • How to read saved data in BPC 7 Nw Script Logic

    Hi all,
       I am trying to write the logic for Price*Quantity Calculation. This logic should be executed whenever user saves the data for either Quantity or Price.
    For this i created a Implementation on BADI "UJ_CUSTOM_LOGIC". But i am struck on how to read the data from InfoCube ,Like if user saves "Quantity",logic should read "Price" from the cube and calculate the result, Which is equivalent to GET(------) statement in SQL script Logic. Which method should i call to read the saved data in cube.
    Appreciate if someone can help me on this.
    Thanks&Regards,
    Ashok Kumar.

    Hi,
       You can use the LOOKUP instruction like:
    *LOOKUP RATE
    *DIM ENTITY2="DEFAULT"
    *DIM SOURCECURR:INPUTCURRENCY=ENTITY.CURR
    *DIM DESTCURR1:INPUTCURRENCY="USD"
    *DIM DESTCURR2:INPUTCURRENCY="EURO"
    *DIM RATE=ACCOUNT.RATETYPE
    *ENDLOOKUP
    Best regards,
    Mihaela

  • How to make VI wait until data is saved before it can open and read data

    I have developed two VIs for continuous monitoring. First VI is for acquiring raw strain data and saving it into a folder, let's say, every 10 minutes or every 100 Mbyte of data (for example, after monitoring for an hour, the folder will have 6 files, each of which contains 10 minutes of data). Second VI is for opening/reading/processing data files collected by the first VI.   Right now, this second VI can handle only one file at a time. What I am trying to do is to have this second VI open the files one after another automatically. Also (here is what I think will be difficult part), I want the second VI recognize that a file is saved by the first VI before opening it (i.e., wait until the first 10 minutes of data file is saved by first VI, open and process this first data, wait until the second 10 minutes of data file is saved by first VI, open this second file and process it, wait until the third 10 minutes of data file is saved by first VI, open and process it........). Any help or comments would be appreciated.
    Thanks in advance for your help.
    Brdg.

    Basically, If your purpose is to keep one thread from opening the file until the DAQ thread has finished with it, then the queue is what I would use.
    All functions are on the ADVANCED | SYNCHRONIZATION | QUEUE palette.
    Use the OBTAIN QUEUE to create the queue. Set the DATA TYPE to a PATH constant. This creates a queue of paths.
    Pass the QUEUE REFNUM to both the DAQ VI, and the PROCESSING vi.
    In the DAQ VI, when you write a file, take the PATH from the CLOSE FILE function and use ENQUEUE ELEMENT to put it into the queue (use the refnum you passed in).
    In the processing thread, use DEQUEUE ELEMENT to fetch the path from the queue. You probably should use a timeout value of 1000 mSec or so. If you timed out, go check your PROGRAM RUNNING flag (so you can stop without waiting forever on the queue), and if you're not stopped, try again.
    If the DEQUEUE ELEMENT returns WITHOUT a timeout, then open the path it gives you - the file is guaranteed to be closed, since you closed it before you enqueued it.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Help with "The Finder can't complete the operation because some data in "iPhoto Library" can't be read or written. (Error code -36)" Any ideas on how to fix this?

    While trying to copy my iPhoto Library (49.61 GB) to an external hard drive, I receive the error message "The Finder can’t complete the operation because some data in “iPhoto Library” can’t be read or written. (Error code -36)"
    I need to move my library because I have no more disk space.  This was going to be step 1 followed by backing up to another EHD.
    More details: iPhoto version 9.6 (910.29) OX X Yosemite Version 10.10.1 (Mid 2011 Mac Book Air).  EHD= WD Elements 1 TB (purchased at B&H Photo where the sales associate formatted it for a Mac).
    Any step by step ideas for help are appreciated!  I've read through a few threads but need more step by step directions.

    That error message is an I/O error which can mean a number of things, among them a bad file.  Here's a couple of fixes you can try:
    1 - use the free version of  iPhoto Library Manager  to rebuild the library with the rebuild being created on the  EHD as follows:
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.>Click on the Add Library button,
    2 -  select the library you want to add from those in the selection window.
    3 - make sure that in the rebuild window the checkbox  "Scavange orphaned photos" is checked.
    4 - now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option
    5 - in the next  window name the new library and select the location you want it to be placed. Click on the Create button.
    Note 1: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments. However, books, calendars, cards and slideshows will be lost.
    Note 2:  Your current library will be left untouched for further attempts at a fix if so desired.
    When iPLM finishes it will display a log file entry showing which files it was unable to use in the rebuild.  Open the old library with iPhoto, locate and delete the photos that iPLM listed in its log.  Then try dragging the library to the EHD again.
    If the above fails continue with:
    2 - create a new, empty library on the EHD.  Use the paid version of iPhoto Library Manage to copy the events (1-2 at a time) to the new library on the EHD.  At one point iPLM may run into the bad file and be unable to copy the event.  You can check iPLM's log to see what file it is.  Then open that library, delete the file and either try to copy the entire library by dragging and dropping or contine with the copying of events from the old library to the new library.

Maybe you are looking for