LOV usage -- Can LOV used as key-value pair?

Post Author: phoenix
CA Forum: WebIntelligence Reporting
Hello,
I am using BO XI R2 and I come to an issue with LOV. Can LOV be used as a key-value list?
Say I have a key-value list as below:
A --> 1
B --> 2
Can LOV just list 'A, B.. ' and return 1 if user choose A and 2 if user choose B?
Many thanks.
phoenix

It is possible only if you know all possible KEY values:
with t as (
           select 1 id,'STATUS' key,'TRUE' val from dual union all
           select 1,'AGE GROUP','10' from dual union all
           select 1,'TRAVEL','Y' from dual union all
           select 2,'STATUS','FALSE' from dual union all
           select 2,'AGE GROUP','20' from dual union all
           select 2,'TRAVEL','N' from dual
select  id,
        max(case key when 'STATUS' then val end) status,
        max(case key when 'AGE' then val end) age,
        max(case key when 'AGE GROUP' then val end) "AGE GROUP",
        max(case key when 'TRAVEL' then val end) travel
  from  t
  group by id
        ID STATUS AGE   AGE GROUP TRAVEL
         1 TRUE         10        Y
         2 FALSE        20        N
SQL> If you are on 11g, you can use PIVOT construct, but again you need to know resulting columns upfront.
Another thing you could do is to return a CSV list of key all values in one column using STRAGG (or LISTAGG if you are on 11.2), hierarchical queries, XML or undocumented WM_CONCAT.
SY.

Similar Messages

  • Can we achieve data conversion for my scenario key value pair

    My data 
    create table test
    ( id int,name varchar(10),value int, color varchar(20))
    I would like to have data in the following format 
    where each id will combination of data set for each row for a id and separated by delimiter from another set
    like a key value pair
    ID Value
    1 |a,10,green|a,15,blue|
    2 |b,11,red|b,12,yellow|
    Please let me know if this can be achived in SSIS using trasnformation or in SQL ?
    And if so what is the best approach to hande this conversion
    Mudassar

    Thanks for your help.
    I can assume that it can only be handled in SQL and this cant be done in SSIS transformations.
    EXAMPLE 4 - Using XML PATH & correlated subquery for sublist
    -- Create comma delimited sublist
    SELECT   Subcategory = ps.[Name],
             ColorList = Stuff((SELECT DISTINCT  ',
    ' + Color AS [text()]
                                FROM AdventureWorks2008.Production.Product
    p
                                WHERE p.ProductSubcategoryID = ps.ProductSubcategoryID
                                FOR XML PATH ('')),1,1,'')
    FROM     AdventureWorks2008.Production.ProductSubcategory
    ps
    ORDER BY Subcategory;
    GO
    Subcategory             ColorList
    Helmets                 Black, Blue, Red
    Hydration Packs         Silver
    Jerseys                 Multi, Yellow
    Mudassar

  • Using multiple key values to find data

    Hello, It's me again.
    I had a question about bring data out from Database and show on an ADF page on Jdev 11.1.1.3.
    And Mr. Daniel Atwood     answered my question with this follow blog he wrote.
    http://www.avioconsulting.com/blog/datwood/2012/06/19/using-bpm-process-variable-adf-form-retrieve-database-information-0.
    But I have another question on the top of that.
    The example Mr.Atwood provided is when you using "one" key value, what if I have two key values, how to set this up?
    Here are some details:
    I have a table like this
    ID     Type_code     Name
    0001      05      a-blabla
    0002     25      b-blabla
    0002     26      b-blabla
    0003      08      c-blabla
    0003      25      c-blabla
    0003     79      c-blabla
    What I want to do is after input the ID(0003) and type_code (25), it will show me the result on three input text components in ADF page with value 0003, 25 and c-blabla.
    Currently, I can use only ID to query the data, but I would like to use two key values to find the specific data.
    Thank you very much for taking time to think about this,
    Sincerely,
    Viola

    Dear Daniel, may I ask one more question please?
    what if I have 4 tables?
    table1
    ID * ID_Type_code * Name
    0001 * 11 * abc
    0002 * 12 * abcd
    0003 * 13 * abcde
    table2
    ID * OID_type_code * Name
    0001 * 22 * abc
    0002 * 23 * abcd
    0002 * 25 * abcd
    0003 * 23 * abcde
    0003 * 22 * abcde
    0003 * 28 * abcde
    table3
    ID * OID_type_code * OGAD_line_id * address
    0001 * 22 * 1 * a street
    0001 * 22 * 2 * b street
    0002 * 23 * 1 * c street
    0002 * 25 * 1 * d street
    0003 * 28 * 1 * e street
    0003 * 28 * 2 * f street
    0003 * 28 * 3 * g street
    table 4
    ID OID_type_codeOGAD_line_id*COP_line_id*phone number
    0001*22*1*1*2222222222
    0001*22*1*2*3333333333
    0002*23*1*1*4444444444
    0003*28*2*1*5555555555
    0003*28*2*2*6666666666
    Primary key for each table
    table1, primary key is ID
    table2, primary key is ID , OID_type_code
    table3, primary key is ID , OID_type_code, OGAD_line_id
    table4, primary key is ID , OID_type_code, OGAD_line_id , COP_line_id
    I would like to show each value in each table in the separate input text fields.
    Therefore, this is an advanced question based on the previous one, not only get values from one table but also from several tables based on input for example 0003 and 28 as the ID and OID_type_code?.
    Let me know if you need more details,
    Thank you so much,
    Viola

  • How can we create a look-up in Enterprise Gateway.. like key value pair..???

    How can we create a look-up in Enterprise Gateway.. like key value pair..???

    Hi,
    You want to have a look at KPS, Key Property Store. Link: Key Property Stores
    Cheers,
    Stefan

  • Can I use suquery in Values calues

    Can i use Subquery in Values caluse.
    INsert into copy_emp
    values (select * from emp);

    Use following instead:
    insert into copy_emp select * from emp;

  • I have my mac pro with the keyboard in spanish and i didn't knew that it was going to be a big problem because i can't use the key pads the way they are printed, how can i use them the way they r printed?

    i have my mac pro with the keyboard in spanish and i didn't knew that it was going to be a big problem because i can't use the key pads the way they are printed, how can i use them the way they are printed?

    why can't you use the keyboard the way it is printed?

  • Can i use the key figure total delivery time in days in rows and how is can

    Dear all,
              Can i use the key figure total delivery time in days in rows and how is can.but all the key figures r used in rows but i cannot use in column.i want bothin rows and in column  at a time ,can this is possible,and how.

    Hi,
      yes you can.You will have to use structure in the row.
    Right click on the row and create a new structure.
    In this structure you can add key figure.
    Maximum number of structure a query can have is two
    Please assign points if it helped you.
    Regards,
    Senoy

  • My configuration audio "output" is only numerique and I would like listen to audio by integrated loudspeaker. I can't use the keys "sound on my computer. If I click on I have a icon "forbiden".  Can you help me

    my configuration audio "output" is only numerique and I would like listen to audio by integrated loudspeaker. I can't use the keys "sound on my computer. If I click on I have a icon "forbiden".  Can you help me

    Si vous tappez sûr le cle <<option>> et cliquez vôtre souris de l'icon de haut-parleur
    de le haut partie de sa Desktop, vous pouvez voir les choix pour le son: les haut-parleurs internales, Line out et Digital Out. C'est tout ! Ou cliquez de la Pomme a gauche, choissisez Préferences, et Son, et voila..... le meme chose.....
    Merci d'avoir choisi Apple
    John B

  • How can I make "F5" key value to System

    subject : How can I make "F5" key value to System
    I like to refresh web page automatically.
    so I have to input "F5" key value of keyboard to local system.
    How can I do this job ?

    Thank you so much !
    I solved the problem thanks to your advice .
    Thank you again~

  • Mapping unique elements to a Key Value Pair using XSLT in ESB

    Hi Guys,
    I am in need of a solution for mapping some of the response elements to a a key value pair in my target schema. How could I achieve this. It is very very urgent. How will the XSL look like
    Source
    <Source>
    *<Element1>One</Element1>*
    *<Element2>Two</Element2>*
    <Action>Manage</Action>
    </Source>
    Target
    <Target>
    <Action>Manage</Action>
    <AdditionalData>
    *<KeyValuePair>*
    *<key>Element1</key>*
    *<value>One</value>*
    *</KeyValuePair>*
    *<KeyValuePair>*
    *<key>Element2</key>*
    *<value>Two</value>*
    *</KeyValuePair>*
    </AdditionalData>
    </Target>
    Edited by: user13156113 on May 25, 2010 7:01 AM

    Below is the soultion which I finally did it by myself. Any other solutions would be welcome.
    <ns10:AdditionalData>
    <xsl:for-each select="//node()">
    <xsl:if test="text()">
    <ns16:KeyValuePair>
    <ns16:Key>
    <xsl:value-of select="xp20:upper-case(name(.))"/>
    </ns16:Key>
    <ns16:Value>
    <xsl:value-of select="."/>
    </ns16:Value>
    </ns16:KeyValuePair>
    </xsl:if>
    </xsl:for-each>
    </ns10:AdditionalData>

  • How to combine large number of key-value pair tables into a single table?

    I have 250+ key-value pair tables with the following characteristics
    1) keys are unique within a table but may or may not be unique across tables
    2) each table has about 2 million rows
    What is the best way to create a single table with all the unique key-values from all these tables? The following two queries work till about 150+ tables
    with
      t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select coalesce(t1.key, t2.key, t3.key) as key
    ,      max(t1.val) as val1
    ,      max(t2.val) as val2
    ,      max(t3.val) as val3
    from t1
    full join t2 on ( t1.key = t2.key )
    full join t3 on ( t2.key = t3.key )
    group by coalesce(t1.key, t2.key, t3.key)
    with
      master as ( select rownum as key from dual connect by level <= 5 )
    , t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select m.key as key
    ,      t1.val as val1
    ,      t2.val as val2
    ,      t3.val as val3
    from master m
    left join t1 on ( t1.key = m.key )
    left join t2 on ( t2.key = m.key )
    left join t3 on ( t3.key = m.key )
    /

    A couple of questions, then a possible solution.
    Why on earth do you have 250+ key-value pair tables?
    Why on earth do you want to consolodate them into one table with one row per key?
    You could do a pivot of all of the tables, without joining. something like:
    with
      t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select key, max(t1val), max(t2val), max(t3val)
    FROM (select key, val t1val, null t2val, null t3val
          from t1
          union all
          select key, null, val, null
          from t2
          union all
          select key, null, null, val
          from t3)
    group by keyIf you can do this in a single query, unioning all 250+ tables, then you do not need to worry about chaining or migration. It might be necessary to do it in a couple of passes, depending on the resources available on your server. If so, I would be inclined to create the table first, with a larger than normal percent free, then do the first set as a straight insert, and the remaining pass or passes as a merge.
    Another alternative might be to use the approach above, but limit the range of keys in each pass. So pass one would have a predicate like where key between 1 and 10 in each branch of the union, pass 2 would have key between 11 and 20 etc. That way everything would be straight inserts.
    Having said all that, I go back to my second question above, why on earth do you want/need to do this? What is the business requirement you are trying to solve. There might be a much better way to meet the requirement.
    John

  • Application specific key-value pairs in jndi.properties

    Hello,
    Can I specify my application specific key-value pair in jndi.properties?
    I tried something like this
    java.naming.factory.initial=.jndi.WLInitialContextFactory
    java.naming.provider.url=t3://localhost:7001
    myVar=myVal
    When i tried looking up "myVar" from my client program, I got an error.
    The other parameters like weblogic.jndi.WLInitialContextFactory are picked up.
    Anyhelp will be appreciated
    Vasim

    We have a similar problem.
    We would like to configure our PROVIDER_URL for a specific web application - not
    for the entire server. Since the URL should be different in development, test
    and production environments, we would prefer to just set it in the deployment
    descriptor. And we have a lot of code that just uses
    ctx = new InitialContext();
    when looking up EJBs, queues etc.
    Actually, to take the problem one step further, it should be expected that later
    we will have EJB's deployed on different machines/clusters - so we will actually
    need specific urls for each EJB.
    Is there a good way to do this? Or will we have to custom-develop our own jndi
    configuration standard using application parameters to set which JNDI provider
    each EJB should be looked up with?
    Alternativaely, can we "import" the JNDI trees of the app server in the JNDI tree
    of the web servers?
    So, how should we go about this?
    Robert Patrick <[email protected]> wrote:
    Vasim wrote:
    Hi Robert,
    You are right. But The object "myVar" which I am trying to look upis not in
    the JNDI tree nor am I interesed in binding it . But my requirementis that
    I have one application specific variable which I am trying to lookup and I
    dont want to have a separare config file for this..and hence the question..So, put the properties you want in the jndi.properties file and load
    the properties
    file from your code by doing something like this:
    Properties props = new Properties();
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    if (cl == null)
    cl = System.getSystemClassLoader();
    InputStream is = cl.getResourceAsStream("jndi.properties");
    props.load(is);
    Personally, I would not use this file and would create an application-specific
    file
    or, as Daniel suggested, define your properties as a System property
    and use
    System.getProperty("myVar").
    btw, is jndi.properties only for those objects which are bound to jnditree?
    jndi.properties is only used for creating the JNDI InitialContext. The
    whole idea
    of this file is that in remote client code (without the jndi.properties
    file), you
    need to do something like this to tell the JNDI classes how to connect
    to the JNDI
    provider:
    Properties props = new Properties();
    props.put(Context.PROVIDER_URL, "t3://myservername:7001");
    props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    InitialContext ctx = new InitialContext(props);
    but inside the server, you only need to do this because the server is
    the provider
    and already knows how to connect to itself:
    InitialContext ctx = new InitialContext();
    Therefore, the jndi.properties file allows you to externalize this property-setting
    code that sets up the properties to be passed to the InitialContext constructor
    so
    that the remote client code can now look exactly like the code inside
    the server.
    The InitialContext constructor will look for this jndi.properties file
    in your
    classpath and load it to get the necessary configuration information
    to determine
    how to connect to the JNDI provider.
    Hope this helps,
    Robert

  • Key value pair error

    Hello
    how can I fix this problem ?
    SAPNW2004sJavaSP9_Trial\SAP_NetWeaver_2004s_SR_1
    jdkversion 142_09 .
    ERROR 2008-07-09 23:56:30
    CJS-30051  Cannot insert a key value pair into the secure store fails; see output of log file SecureStoreInsert.log: SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    ERROR 2008-07-09 23:56:30
    FCO-00011  The step insertAdminDataInSecStore with step key |NW_Java_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CI_Instance|ind|ind|ind|ind|11|0|NW_CI_Instance_Configure_Java|ind|ind|ind|ind|3|0|insertAdminDataInSecStore was executed with status ERROR .
    Thanks
    sas

    Hi this the content of  SecureStoreInsert .
    com.sap.security.core.server.secstorefs.NoEncryptionException: Encryption or decryption is not possible because the full version of the SAP Java Crypto Toolkit was not found (iaik_jce.jar is required, iaik_jce_export.jar is not sufficient) or the JCE Jurisdiction Policy Files don't allow the use of the "PbeWithSHAAnd3_KeyTripleDES_CBC" algorithm.
    at com.sap.security.core.server.secstorefs.SecStoreFS.openExistingStore(SecStoreFS.java:1975)
    at com.sap.security.core.server.secstorefs.SecStoreFS.handleInsert(SecStoreFS.java:963)
    at com.sap.security.core.server.secstorefs.SecStoreFS.main(SecStoreFS.java:1276)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Caused by: java.lang.SecurityException: The provider IAIK may not be signed by a trusted party
    at javax.crypto.SunJCE_b.a(DashoA12275)
    at javax.crypto.Cipher.a(DashoA12275)
    at javax.crypto.Cipher.getInstance(DashoA12275)
    at com.sap.security.core.server.secstorefs.Crypt.<init>(Crypt.java:220)
    at com.sap.security.core.server.secstorefs.SecStoreFS.<init>(SecStoreFS.java:1346)
    at com.sap.security.core.server.secstorefs.SecStoreFS.handleInsert(SecStoreFS.java:954)
    ... 6 more

  • Is it possible to load 1 billion key-value pairs into BerkeleyDB database?

    Hello,
    I experiment with loading huge datasets into BerkeleyDB database. The procedure is as follows:
    1. Generate a dump-like file using a script. The file contains key-value pairs (on separate lines, exactly in the format of the dump file, that can be produced by db_dump). The index is hash.
    2. Use db_load to create a database. The OS is windows server 2003.
    Both key and values are 64-bit longs.
    Using this procedure, I succeeded to load 25 million pairs in the database. It took about 1-2 hours.
    Next, I tried to load 250 million pairs into an empty database. db_loader runs already 15 hours. It's memory consumption is very low: private bytes ~2M, working set ~2M, virtual size ~13M. db_loader already read all the pairs from disk, as IO is very low now: ~4M per second. I am not sure if db_loader will finish in next 24h hours.
    My goal is to load eventually 3 billion key-value pairs into one DB.
    I will appreciate if someone will advise me:
    1. If BerkeleyDB is capable of dealing with such database volume.
    2. Is my procedure good, how to optimize it. Is it possible to allocate more RAM to db_load? Are there other ways to optimize loading time?
    Thank you,
    Gregory.

    Hello Sandra,
    The version is: Berkeley DB 5.0.21: (March 30, 2010).
    The data: keys and values are random 64 bit numbers.
    The header of the "dump" file that I am trying to load is (there are 256 * 1e6 key-value pairs in the file):
    VERSION=3
    format=bytevalue
    type=hash
    h_nelem=512000000
    db_pagesize=8192
    HEADER=END
    The db_load allocates 1G memory cache.
    Thank you,
    Gregory.

  • Crypting url key/value pairs

    on the web i have seen urls like this:
    http://www.domain.com/shop?xyz=FHS767KJDF789SFhsf679Iizgboo67hoOOUGg688
    I think, that's an url where the key/value pairs are cryted, so clear text the url above might look like this:
    http://www.domain.com/shop?id=12&action=show&object=product&navigation=right
    I guess that's done for security reasons and it seems to me to be a good way to make an url a little bit harder to understand.
    So i would like to ask whether anyone uses this kind of url scrambling and which methode you use to scramble the url? Any tipps, tricks, feedbacks are welcome!
    Tanks for your help.

    Occasionally we create a signature from our query string and append that to the URL in order to check that the URL hasn't been modified. But we don't remove the original parameters so we can use the normal parameter parsing.
    Michael

Maybe you are looking for

  • How to access the client PCs via RDP FROM Windows Server 2003

    Hopefully this is not an ignorant question, but every thread I've read focuses on client PCs not being able to access the terminal server. I have the opposite problem. I am working remotely and have full access to the servers (some of which are virtu

  • No use=No refund?

    I have not been able to sign in and use the Creative Cloud for about a year. I could not sign in and kept getting kicked out. During that time, I have been disabled and now can no longer afford to pay the new, higher subscription prices. Is there any

  • Working with clips, channels, and tracks

    This question was posted in response to the following article: http://help.adobe.com/en_US/premierepro/cs/using/WS1c9bc5c2e465a58a91cf0b1038518aef7-7f49a .html

  • I cant write reviews for apps from my Iphone 3gs

    For some reason I have never been able to write reviews for apps. As soon as I type anything in the title or comments box it greys out the send button so I cant submit anything. Does anyone have any ideas how to fix this?

  • Art brush on an ellipse creates a gap

    See attached file. I am applying this Art Brush on a perfect circle I've drawn with the Ellipse Tool. It is a closed path. Why the gap? Any way to get it to go all the way around?