by the way of multiple key values

Hi all

I need to know how to pass the keystore multiple values for more information of a simultaneously.i esxserver came to know that keystore value from the variable approx.

' %JAVAHOME%"\bin\java-'%»-Djavax.net.ssl.trustStore="%VMKEYSTORE% LOCALCLASSPATH' cp - Xmx1024M ARG %.

can I know what - Xmx1024M in this average line. ? and if I put several key values:

c:\VMware-Certs\vmware.keystore;c:\VMware-Certs\vmware1.keystore in the variables env, I get error.

Can I get a detailed explanation of what is happening.

Thanks in advance.

Simo

You can import the certificates of all servers in the same keystore file and just refer to that one.

Steve JIN, VMware engineering

Creator of VI Java API: http://vijava.sf.net

Tags: VMware

Similar Questions

  • With the help of several key values to find the data

    Hello, it's me again.

    I had a question out about data from database and display them on a page of the ADF on Jdev 11.1.1.3.

    And Mr. Daniel Atwood answered my question with this blog to follow, that 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 top that.

    The Mr.Atwood example is when using a value of key 'one', what happens if I have two key values, how to set?

    Here are some details:

    I have a table like this

    ID Type_code name
    0001 05 a-blabla
    0002 b 25-blabla
    0002 26 b-blabla
    0003-08 c-blabla
    0003 25 c-blabla
    0003 c 79-blabla

    What I want to do is after the entry of the ID (0003) and type_code (25), he will show me the result on three components of text entry in the ADF with the value 0003, 25 page and c-blabla.

    Currently, I use only ID to query the data, but I would use two key values to find specific data.

    Thank you very much for taking the time to think about it,

    Sincerely,

    Alto

    If you had multiple values to use for the request, one approach would be to create a display object. Whether you are creating the view object, in step 6, you will add two bind variables. Call a "pTypeCode" and call the other "pId". Click on the back button so that you're still in step 5, and modify the WHERE clause as follows:

    (ID = :pId) and (Type_code = :pTypeCode)
    

    After you have done this, double-click the Module of the Application and add your new view object. In the tab control of data, click the Refresh button. Expand your new view object tab of data control-> expand "French"-> note that you now have a new method called "ExecuteWithParams".

    Open your workflow diagram-> delete your existing "SetCurrentRowKeyValues" method-> made slide on your new "ExecuteWithParams" operation on the diagram. When you do so, you should see two settings you need to complete the dialog box. Just as you did before with the SetCurrentRowKeyValue method, set the values for the pTypeCode and the nest.

    Add the case of control flow of the new method to your existing view-> make the new method, the default value.

    On your form, remove the fields that have been placed here who uses the old object from view. On the tab of data control, drag the fields you want to be placed on the inside of your new view object form.

    Dan

  • By the way a prompt concatenated value to filter a report

    Hello, I am relatively new to OBIEE and still learn the basics.

    I have a multiple selection of dashboard prompt where users want to see 2 columns concatenated:

    Dept Num |' -' || Name of Dept

    I'm having a hard time to find ways filter my report based on this concatenated value. I really need to filter on Num Dept, but on the concatenated value of filtering would be nice too.

    In other words, if a person chooses * 555 - billing * then I'd be ok just by the way * 555 * to the report. However, if it is easier to State to accept the full string, then I'd be ok with that too. I just need to be able to filter is the report on Dept Num |' -' || Name Dept or Dept Num based on concatenated value that the user would choose from the prompt.

    Any help/advice would be greatly appreciated.

    You can either:

    Create the column in your query responses and use the filter icon
    or
    create the filter first simply based on the column dept, "is invited", and then in the filter properties, you can choose to change the formula for the column.

    Both have the same effect.

    If you have already saved as a shared filter, you can change the formula column in there also in the same way as above, just find your shared filter find the dept column and choose the formula column change.

    Another thing, when you want to accept as input when prompted, you can value "is invited" or it has a fixed value, the guest of the dashboard will replace the fixed value as long as the formula of the pass are the same.

  • change the way dynamic link attribute value

    Is it possible to dynamically change the link of a workflow attribute value, attaching it to a configuration specific vCO (attribute) based on a drop-down menu in the presentation of the workflow?

    I'm looking for an easy way to maintain a minimal set of workflows and configurations for the provision of the ESX hosts based on the environment.  I have a unique set of workflows that manage commissioning, and multiple configurations of vCO defined by ESX hosting environment (i.e. values by default attributes/for DNS, AD, IP settings for laboratory, test, prod, site1, site2, etc..).  I would like to be able to select a hosting environment configuration given in a drop-down list when I start the workflow, which would then set some attributes of workflow to the value of their corresponding configuration attributes.

    Any ideas, or is there a better approach?

    You can check the object 'Server' script, there is a method to access the ConfigurationElementCategory and from there, you can get your ConfigurationElement.
    So, you can use the solution above, Martin and in access to script Action ConfigurationElement.

  • by the way of multiple charts for sub vi

    Hello

    I'm rather new to labview and could use some advice.  My current project is using a loop for to create a chart for measurements of I to V of each sample of solar cells (each parcel is on a separate chart).  Multiplexing is externally via labview control.  I have a Subvi to show a sample report to the user before they are invited to save the report.

    What would be the best way to transmit graphics data for 6 (or more) a slot - VI and then recreate the graphics in the Subvi?  In my view, that a solution would be to use a shift to concate register bays of each series.  Unfortunately, the size of the array is determined by the user (number of test on the graph points) running, and I don't know if I can separate the data correctly in the Subvi.

    Another question would be to create an array of separate graphs (graph 1 element of table 1, etc.) using the group for each chart as an array element?  I ask this because it seems that data within the Subvi separation would be easier with this method.

    Thanks in advance for the help.

    Without seeing the rest of your code, you can use a table of references or simply a table of waveforms. If you data for charts is not under the waveform you can simply create the type of waveform data using the wave to build function. See example attached to the approach of references.

    pjr1121 wrote:
    Do you know an example that illustrates the implementation of clusters in a table?

    I don't understand what you're asking here. Are you referring to an array of clusters? On the front panel or on the diagram block as a constant or the block diagram with respect to the construction of an array of bunches per program. For the façade, just place a table control and then drag a control of cluster within the table. Then place the elements of the cluster within the element of the cluster. For a constant block diagram, it is the same approach. To build programmatically, use Bundle or the boot by name then build Array or replace a subset of table depending on whether you are a new array of construction or replacement of an array element.

    Did you have a LabVIEW tutorials? To learn more about LabVIEW, it is recommended that you go through the tutorials and look over the material in tutorials the NI Developer Zone Learning Center , which provides links to other materials and other. You can also take a course online for free.

  • Key value pair relational table - cross tab / pivot out?

    I have a Table of KVP and the structure is ID, Key, Value and this is the sample values...

    Table with values

    ID, Key, Value
    TABLE 1, TRUE
    1, AGE GROUP, 10
    1, TRAVEL, Y
    2, TABLE, FALSE
    2, AGE GROUP, 20
    2, TRAVEL, N

    I want to turn it these date like below (output)

    ID, STATUS, AGE GROUP, TRAVEL
    1, TRUE, 10, Y
    2, FALSE, 20 N

    I read on analysis crossroads/pivot - but not able to make a query that can give me the output above. The structure of the table cannot be changed...! My bad.

    Is it possible in sql, to do my output to look like above?

    It is possible if you know all the possible values for the KEY:

    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 the PIVOT, but again, he must know the columns resulting from the outset.

    Another thing, you could do is to return a list CSV key of all the values in a column using STRAGG (or LISTAGG if you are on 11.2), hierarchical queries, XML or WM_CONCAT without papers.

    SY.

  • What is the best way to move with esx3.5 vmtools key/value pairs?

    Hello

    I found both candidates to store the key/value pairs for a vmware client. My ultimate goal is to run a process on the VC box that updates these data, and then read through the software tools of vm on the host (somehow) were invited.

    The first method is through 'guestinfo' settings which can be adjusted in four ways:

    Add the variable of the vmx fileprompt.
    Set the variable manually on the client (using vmwareservice.exe - cmd "infoset");
    using vmware-cmd (vmware-cmd & lt; vm-cfg-path & gt; setguestinfo & lt; variable & gt; & lt; value & gt;)
    the use of vmcom.dll COM objects (seems to be deprecated in ESX 3.5)
    These variables are easily accessible on the client by running vmwareservice.exe - cmd 'info-get guestinfo.variablename '. However, I cannot find a convenient way (better based on powershell) of their definition of a scheduled task or service to VC area.

    The second method is the customfields of guests in VItoolkit property, which can be defined as follows:

    get - vm MyVMName | Game-CustomField-nameOfValue name-value DataToBeStored
    Unfortunately, I am unable to access these data in the comments, and indeed I do not know if this is possible. If this isn't the case, I guess my only recourse would be to write a tool to connect to Web services on the VC box with a low privilege account. I prefer not to do this because it means the network infrastructure implementation to point the guest to the right VC, development of custom etc permissions...

    So, my questions are:

    • Is it possible to define variables of guestinfo through VI Toolbox, running on the virtual circuit?

    • Is it possible to read customfields on the client, through the vmtools?

    • Or is there another method to make this key/value data exchange?

    You can add/edit entries in the VMX file like this

    $vm = get-vm  | Get-View
    
    $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
    $vmConfigSpec.extraconfig += New-Object VMware.Vim.optionvalue
    $vmConfigSpec.extraconfig[0].Key= "guestinfo"
    $vmConfigSpec.extraconfig[0].Value = "whatever"
    
    $vm.ReconfigVM($vmConfigSpec)
    
  • LrView: Binding to multiple keys in the two sense

    Hi all

    I want more then a key in the binding table to link a view (popup). It is no problem to make the table to display. It is clear for me, how operation = function (binder, values obtained) works. But not the other way around. How can I retrieve the new value of the display in this function? It is in the 'values' with a special key? As this picture is not standard, I don't find a way to debug it. If I could: how to set the values in the binding table? Through the special "values" of the table or I have to return an array of key/value pairs?

    Kind regrads,

    Wolfgang

    But maybe you can also use a function of "transformation" to get the pop-up - see page 106 of the SDK Guide.

    I just wrote a suite of sample guide boards in the SDK, and transform() passed to LrView.bind () lafonction reports indeed the new value of the control.  For example:

    local LrBinding = import 'LrBinding'
    local LrDialogs = import 'LrDialogs'
    local LrFunctionContext = import 'LrFunctionContext'
    local LrView = import 'LrView'
    
    local bind = LrView.bind
    local f = LrView.osFactory()
    
    LrFunctionContext.postAsyncTaskWithContext ("showDialog", function (context)
        local prop = LrBinding.makePropertyTable (context)
        prop.checkbox = false
        local controls = f:column {bind_to_object = prop,
            spacing = f:control_spacing (),
            f:checkbox {title = "Change popup", value = bind ("checkbox")},
            f:popup_menu {
                items = {{title = "a", value = "a"}, {title = "b", value = "b"}},
                value = bind {keys = {"checkbox"},
                    operation = function (binder, values, fromTable)
                        if fromTable then return values.checkbox and "b" or "a"
                            end
                        return LrBinding.kUnsupportedDirection
                        end,
                    transform = function (value, fromModel)
                        if fromModel then
                            prop.sTrue = value
                        else
                            prop.sFalse = value
                            end
                        return value
                        end}},
            f:row {f:static_text {title = "popup fromModel = true:"},
                f:static_text {title = bind ("sTrue")}},
            f:row {f:static_text {title = "popup fromModel = false:"},
                f:static_text {title = bind ("sFalse")}}}
        local result = LrDialogs.presentModalDialog {title = "simple_list test",
            contents = controls}
        end)
    
  • Using the index of multiple values

    Hi guys,.

    Trying to assess the benefits of the addition of index of multiple values, a quick question on the index of multiple values:

    Here's my content from the cache:

    Key (EmpID), value [employee (age int, double salary, Department of String)]
    (1, new employee (25, 35000.0, "Admin"));
    (2, new employee (22, 30000.0, "Admin"));
    (3, new employee (34, 40000.0, 'Communications'));
    (4, new employee (36, 41000.0, "Admin"));
    (5, new employee (36, 42000.0, "HR"));
    (6, new employee (29, 30000.0, "HR"));
    (7, new employee (51, 50000.0, "BackOffice"));
    (8, new employee (36, 35000.0, "HR"));
    (9, new employee (46, 45000.0, "Admin"));
    (10, new employee (48, 47000.0, "HR"));

    If I still want to find all employees in the 'Human resources' Department and whose salary is more than 35000.

    Eventually, I would like to do the following:
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    cache.addIndex (salExtractor, false, null);
    cache.addIndex (depExtractor, false, null);

    EqualsFilter departmentFilter = new EqualsFilter (depExtractor, 'HR');
    GreaterFilter salFilter = new GreaterFilter (salExtractor, 35000);
    Filter allFilter = new AllFilter (new filter [] {departmentFilter, salFilter});
    Employees value = cache.entrySet (allFilter));

    For my usecase above how can I use the indexing of multiple values to the same query?
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    MultiExtractor mExtractor is new MultiExtractor (new ValueExtractor [] {salExtractor, depExtractor});.
    cache.addIndex (mExtractor, false, null);

    But how can I use the extractor to create multivalued filter queries for employees in the Department of human resources with greater than 35000 salary? Any ideas are much appreciated.


    Thank you

    D wrote:
    Hi guys,.

    Trying to assess the benefits of the addition of index of multiple values, a quick question on the index of multiple values:

    Here's my content from the cache:

    Key (EmpID), value [employee (age int, double salary, Department of String)]
    (1, new employee (25, 35000.0, "Admin"));
    (2, new employee (22, 30000.0, "Admin"));
    (3, new employee (34, 40000.0, 'Communications'));
    (4, new employee (36, 41000.0, "Admin"));
    (5, new employee (36, 42000.0, "HR"));
    (6, new employee (29, 30000.0, "HR"));
    (7, new employee (51, 50000.0, "BackOffice"));
    (8, new employee (36, 35000.0, "HR"));
    (9, new employee (46, 45000.0, "Admin"));
    (10, new employee (48, 47000.0, "HR"));

    If I still want to find all employees in the 'Human resources' Department and whose salary is more than 35000.

    Eventually, I would like to do the following:
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    cache.addIndex (salExtractor, false, null);
    cache.addIndex (depExtractor, false, null);

    EqualsFilter departmentFilter = new EqualsFilter (depExtractor, 'HR');
    GreaterFilter salFilter = new GreaterFilter (salExtractor, 35000);
    Filter allFilter = new AllFilter (new filter [] {departmentFilter, salFilter});
    Employees value = cache.entrySet (allFilter));

    For my usecase above how can I use the indexing of multiple values to the same query?
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    MultiExtractor mExtractor is new MultiExtractor (new ValueExtractor [] {salExtractor, depExtractor});.
    cache.addIndex (mExtractor, false, null);

    But how can I use the extractor to create multivalued filter queries for employees in the Department of human resources with greater than 35000 salary? Any ideas are much appreciated.

    Thank you

    I remember, values multiple index refers to a different concept: a multivalued index means that you can retrieve a collection of values of similar role of an attribute on which you can do Contains, ContainsAll filtering, and ContainsAny.

    In this case to fully the lever consistency of querying capabilities, you would
    - either add a sorted index with a custom comparator that compares the tables containing a salary and a Department on a first salary so the base of the Department and add a filter custom which is able to take advantage of the index for the request for the salary and also able to filter on the element of the array of index service
    -Add two independent indices (a sorted index of wages and a unsorted for the Department), in which case you can leverage all existing (GreaterThanFilter, EqualsFilter and AndFilter) code

    Best regards

    Robert

  • How to combine the large number of tables of pair key / value in a single table?

    I have a pair key / value tables of 250 + with the following features

    (1) keys are unique within a table but may or may not be unique in the set of tables
    (2) each table has about 2 million lines

    What is the best way to create a single table with all unique key-values of all these paintings? The following two queries work up to 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 the hell you have 250 + tables pair key / value?

    Why the hell you want to group them in a table containing one row per key?

    You could do a pivot of all the tables, not part. 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 key
    

    If you can do it in a single query, Union all 250 + tables, you don't need to worry about chaining or migration. It may be necessary to do this in a few passes, depending on the resources available on your server. If so, I would be inclined to first create the table, with a larger than normal free percent, making the first game as a right inset and other pass or past as a merger.

    Another solution might be to use the approach above, but limit the range of keys with each pass. So pass we would have a like predicate when the key between 1 and 10 in every branch of the union, pass 2 would have key between 11 and 20, etc. In this way, everything would be straight inserts.

    That said, I'm going back to my second question above, why the hell you want or need to do that? What is the company you want to solve. There could be a much better way to meet the requirement.

    John

  • HashMap.hashCode () for the hash table with keys matching their values

    Hello

    I found something strange with Hashmaps:

    in the following code:

    HashMap < integer, whole > m1 = new HashMap < integer, whole > ();
    HashMap < integer, whole > m2 = new HashMap < integer, whole > ();
    M1.put (1,1);
    M1.put (2.2);

    M2.put (2.2);
    M2.put (1,1);
    M2.put (5.5);

    System.out.println (M1. Equals (m2));
    System.out.println (M1.hashCode ());
    System.out.println (m2.hashCode ());


    The result is:
    0
    0
    fake

    It seems that when a HashMap receives if key-value pairs the key = its hashCode value becomes 0!
    I'm sure that I did not just fall on a bug in Collections so could someone please explain to me why this happens?

    PS: If you're wondering why the hell would someone do such a Hashmap, I found it useful in the following situations:

    class MyCount {}
    int count;
    The name of the string;
    int age;

    MyCount (String name, int age) {}
    myIdName = name;
    This.Age = age;
    Count = 0;
    }

    void add (int c) {}
    Count += c;
    }

    public int hashCode() {}
    return 31 * age + name.hashCode ();
    }
    }

    Class MyCountClusterer {}
    Collection < MyCount > cluster (counts MyCount []) {}
    < MyCount, MyCount > HashMap countMap = new HashMap < MyCount, MyCount > ();
    for (MyCount c: account) {}
    MyCount CHP = countMap.get (c);
    If (mapC == null) {}
    CHP = new MyCount (c.name, c.age);
    countMap.put (c, c);
    }
    mapC.add (c.count);
    }
    Return countMap.values ();
    }
    }

    It is an unfortunate result of the way in which HashEntry.hashCode () is defined.

    In your case I remove the class MyCount count and change the value to an AtomicInteger.

  • Am I able to configure a wireless iMac keyboard to emulate the way a Windows keyboard responds to a depression of the DELETE keys and BACKSPACE?

    Am I able to configure a wireless iMac keyboard to emulate the way a Windows keyboard responds to a depression of the DELETE keys and BACKSPACE? I want to delete either to the left right GOLD of the cursor. By pressing the DELETE key on Mac does remove one way, but I want the ability to delete in both directions. The Windows keyboard provides a delete key to remove to the right and a key to return back to remove to the left. So I can configure an iMac for this keyboard? My thought is to keep the delete key as it is and ADD a new function to one of the function keys to delete characters to the left. Thanks for your time and your help.

    Mac can go both ways, in case this is useful.  You can use fn more delete to delete to the right.  Also control more.

  • Update multiple of the typedef even to default values?

    I have a panel of 4 (with possibly more to come) controls of type-def I want to find a way back to their values by default when the program begins to run. With the hope is to keep things tidy, are there other options when you try to make the necessary adjustments within these defs-type? Or do I have to literally create a return to default call node for each contorl?

    Thank you

    Create an array of references to the controls. Set the node to call within a loop and autoindex on the table. Then simply add a reference to the table when you add a control to the Panel.

    Lynn

  • Impersonate user without privilege preferred to access the registry on Windows Server 2008 key/value.

    Hello

    I'm trying to impersonate another Administrators\ [an other domian user] to do some access to the registry key/value with an Administrators\ [my domain user].

    Failed with some registry access denied.

    The code is quite format.

    1. the user to logon: LogonUser (username, domain, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, Ref token)! = 0)

    2 DuplicateToken: DuplicateToken (token, SecurityImpersonation, ref tokenDuplicate)

    3 impersonate another user:
    m_ImpersonatedUser = new WindowsIdentity (tokenDuplicate);

    using (m_ImpersonationContext = m_ImpersonatedUser.Impersonate ())

    {

    access to the registry key.

    ...
    }

    This works on Windows7 and some windows server 2008, if the new WindowsIdentity.AuthenticationType is "Kerberos", then it works, but if it's the "negotiation", it will fail.

    Can someone tell how to force the AuthenticationType to be "Kerberos"?

    Thank you.

    Hello

    I suggest you to ask your question at the following link.

    http://social.technet.Microsoft.com/forums/en-us/101ed379-ba6c-4974-BF47-c0e068515116/Server

  • Need help to build the query/pl-sql block to get the query result and the name of column from DB table in the form of key-value pairs.

    Hi Experts,

    I have a DB table has columns of more than 50.

    I question this table, it should only return one line at any time. as sqldeveloper below image.

    here, I need to build block pl/sql-query, Discover the column in the table as a key and query result as values.

    Eg:     Key                         -  Value

    TASK_EVENT_ID - 1765

    EVENT_TYPE - ASR_UPDATE

    ... etc until all of the columns in my table.

    Experts please comment on that point, appreciate your help on this.

    Thank you

    -Vincent.

    Here is an approach using DBMS_SQL to iterate over the columns of key / value to assign... (Little code snipped for brevity)

    create or replace procedure (task_expired)

    v_store_id in full,

    v_task_action_id in full,

    v_job_id in full

    )

    as

    -[SNIP code...]

    v_sql VARCHAR2 (4000): = ' select * from my_table where PK = 123';  -Your SQL here!

    v_v_val VARCHAR2 (4000);

    v_n_val NUMBER;

    v_d_val DATE;

    v_ret NUMBER;

    c NUMBER;

    d NUMBER;

    col_cnt INTEGER.

    f BOOLEAN;

    rec_tab DBMS_SQL. DESC_TAB;

    col_num NUMBER;

    vAsString VARCHAR2 (4000);

    BEGIN

    -[SNIP code...]

    Message_properties. CORRELATION: = "EDF_EVENT";

    MSG: = SYS. AQ$ _JMS_BYTES_MESSAGE. Construct();

    Msg.set_string_property ('queueName', ' shipping/csi_cth');

    Msg.set_string_property ('MODE', 'CR8');

    c: = DBMS_SQL. OPEN_CURSOR;

    DBMS_SQL. PARSE (c, v_sql, DBMS_SQL. NATIVE);

    d: = DBMS_SQL. Execute (c);

    DBMS_SQL. DESCRIBE_COLUMNS (c, col_cnt, rec_tab);

    1.col_cnt J

    LOOP

    CASE rec_tab (j) .col_type

    WHEN 2 THEN

    DBMS_SQL. DEFINE_COLUMN (c, j, v_n_val);      -Number

    WHEN 12 CAN

    DBMS_SQL. DEFINE_COLUMN (c, j, v_d_val);      -Date

    ON THE OTHER

    DBMS_SQL. DEFINE_COLUMN (c, j, v_v_val, 2000);   -Else treat as varchar2

    END CASE;

    END LOOP;

    LOOP

    v_ret: = DBMS_SQL. FETCH_ROWS (c);

    WHEN OUTPUT v_ret = 0;

    1.col_cnt J

    LOOP

    -Fetch each column to the correct data type based on coltype

    CASE rec_tab (j) .col_type

    WHEN 2 THEN

    DBMS_SQL. COLUMN_VALUE (c, j, v_n_val);

    vAsString: = to_char (v_n_val);

    WHEN 12 CAN

    DBMS_SQL. COLUMN_VALUE (c, j, v_d_val);

    vAsString: = to_char (v_d_val, ' DD/MM/YYYY HH24:MI:SS');

    ON THE OTHER

    DBMS_SQL. COLUMN_VALUE (c, j, v_v_val);

    vAsString: = v_v_val;

    END CASE;

    Msg.set_string_property (rec_tab (j) .col_name, vAsString);

    END LOOP;

    END LOOP;

    DBMS_SQL. CLOSE_CURSOR (c);

    DBMS_AQ. ENQUEUE (queue_name-online 'cbus.aqjms_common',

    Enqueue_options => Enqueue_options,

    Message_properties => Message_properties,

    Payload-online msg,

    Msgid => Message_handle);

    dbms_output.put_line ('00 Msgid =' |) Message_handle);

    dbms_output.put_line('===Done=');

    -[SNIP code...]

    END;

    /

Maybe you are looking for