Powershell DSC - Get registry value and send $True / $False depending on present or not

Hello,
With the script below, I can check if a registry key is present, and if it is not, it will create that registry key. But I just want to know if that registry key is present, and get $True / $False as a result of script. - Is this possible with DSC?
Configuration ClientConfig
Param ($MachineName)
Node $MachineName
Registry FooCorpReg1
Ensure = "Present"
Key = "HKEY_LOCAL_MACHINE\SOFTWARE\Test1"
ValueName = "Name"
ValueData = "DSCDemo"
# Save the MOF file
ClientConfig -MachineName "localhost" -OutPutPath "c:\Temp\DSC"
#Start configuration
Start-DscConfiguration -Path "C:\Temp\DSC\" -Wait -Verbose
Best regards,
Anders Johansson

Not what DSC does or is for.  Use erg to look for vale.
Test-Path HKLM:\SOFTWARE\Test1\Name
That is all - it returns true or false.
¯\_(ツ)_/¯

Similar Messages

  • Get textfield value and put it session  JSP

    Hi all .
    I have issuse with Session . this the code . file name (order.jsp)
    %>
    <p>Compute</p>
    <table width="354" border="1">
    <tr>
    <td width="36" scope="col"> </td>
    <td width="148" scope="col">Computer Type</td>
    <td width="148" scope="col">Price</td>
    </tr>
    <%
    while (rset.next ()) {
    %>
    <tr>
    <td><input type="text" name="compno" value="<% out.print (rset.getString ("COMPUTERID"));%>"</td>
    <td><input type="text" name="compty" value="<% out.print (rset.getString (2));%>"</td>
    <td><input type="text" name="comppr" value="<% out.print (rset.getString (3));%>"</td>     
    *<td width="61"><a href= "detailorder.jsp?<% session.setAttribute("comp", request.getParameter("compno"));*
    *     String str=(String)session.getAttribute("comp");     *
    *     System.out.println("file name is"+str);%>=">Add <%=str%></a></td>* </tr>
    <%
    rset.close();
    pstmt.close();
    %>
    my problems is that I would to get "COMPUTERID" value and put it in "comp" and save it as session .
    please help
    raid
    Edited by: raid200 on Apr 23, 2008 12:40 PM
    Edited by: raid200 on Apr 23, 2008 12:41 PM

    Copied from a newly opened topic:
    raid200 wrote:
    Hi
    Thanks for your help . I can take one textfield value and send it to another jsp file
    BUT I would to take all textfield in the row that I would use it .
    Code .
    <p>Compute</p>
    <table width="354" border="1">
    <tr>
    <td width="36" scope="col"> </td>
    <td width="148" scope="col">Computer Type</td>
    <td width="148" scope="col">Price</td>
    </tr>
    <%
    while (rset.next ()) {
    %>
    <tr>
    <td><input type="text" name="compno" value="<% out.print (rset.getString ("COMPUTERID"));%>"</td>
    <td><input type="text" name="compty" value="<% out.print (rset.getString (2));%>"</td>
    <td><input type="text" name="comppr" value="<% out.print (rset.getString (3));%>"</td>     
    <td width="61"><a href=" "detailorder.jsp?compno=<%= rset.getString("COMPUTERID")%">>                               <%session.setAttribute("compna",rset.getString(2));
                                  session.setAttribute("comppr",rset.getString(3)); %>"> BUY ME! </a></td>
    </tr>
    In the detailorder.jsp::::::
    String selectedCompId = request.getParameter("compno");
         session.setAttribute("comp", selectedCompId);
    String computerid=(String) session.getAttribute("comp");
    String computername=(String) session.getAttribute("compna");
    String computerprice=(String) session.getAttribute("comppr");
    in the detailorder.jsp ("""""the compna and comppr give the last record in formation""""""")
    Please Help.
    Raid</a>
    You question shows that you still don't understand how JSPs work.
    Try reading [this article|http://www.javaranch.com/journal/200510/Journal200510.jsp#a1].
    You seem to think that the session.setAttribute call is done when you click the link. This is definitely NOT the case.
    All of the java code runs (including all of those session.setAttribute) calls, and produces HTML. So it will store each element into session, overwriting the previous one.
    To get information from one jsp to another you either pass parameters or use session attributes.
    I showed you how to pass the selected id as a parameter, that you could retrieve in the next JSP.
    So you can get the compid.
    You could pass the other values as parameters as well - thats one approach.
    Alternatively you could use the id to look up the data from the database again.
    Alternatively you could store the +entire list+ of computers in the session, se the selected id to determine which one of those was selected, and get the answers like that.
    The full solution to my mind would be to write a bean method that executes the query, and generates a List of java Objects representing your information.
    You can then put that list in the session, and use it to both generate this JSP and get the information once the user selects one line.
    Hope this helps,
    evnafets

  • How to get the values and attributes of Longlived processes by using ProcessID.

    Hi Experts,
    For  every process we creates, LC ES2 creates processID.
    we know that if you creates  a long lived process, all  the  values which are in proces will be stored some where  in DB.
    Here my requirement is by using  processID I need to get all/some values/variables stored in database.
    I am not able to get values using processID. Here I don't have clue on  how to get the values.
    Please tell me  how to get the same by using  Process Management. Link/guide would be helpful
    Thanks
    Praveen.

    Searchable means you can put a filter criteria on it (e.g. where amount > 50000)
    Visible means you can add have this column returned as an output (and therefore you can add it as column in listview and see it in Task Details).
    These two attributes were provided so that queries could be done against the process variables, but the exact contents of the variables are not allowed to be seen.

  • I bought a used i pod 4 for my daughter and it does not have the message icon on it: how can i put the icon on the i pod and get it receive and send messages

    I bought a used i pod 4 for my daughter and it does not have the message icon on it ( not even in settings) how can I get the message icon on it so it can receive and send messages

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:       
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    -  Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • Get Old Value and the new value based on the date

    Hi
    I have a table called roster created below with following insert statements.
    CREATE TABLE ROSTER
    ROSTER_EMPLOYEE_DEF_ID NUMBER,
    EMPLOYEE_ID NUMBER,
    DEFINITION_REGION_CODE NUMBER,
    DEFINITION_DISTRICT_CODE NUMBER,
    DEFINITION_TERRITORY_CODE NUMBER,
    START_DATE DATE,
    END_DATE DATE
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (1,299,222,333,444,'1-JUN-2011','30-JUN-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (2,299,223,334,445,'1-JUL-2011','20-JUL-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (3,299,224,335,446,'1-AUG-2011','30-AUG-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (4,300,500,400,300,'1-JUN-2011','20-JUN-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (5,300,501,401,301,'1-JUL-2011','20-JUL-2011')
    In the above table we have columns like
    EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE
    The result i am looking from the above table is based on the EMPLOYEE_ID OF START_DATE AND END_DATE
    I need to get OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_CODE
    Similarly OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_REGION_CODE
    and OLD_DEFINITION_TERRITORY_CODE and the NEW_DEFINITION_TERRITORY_CODE
    I need to get one row of data for each employee saying old value and new value
    for employee 299 there are 3 records it must give the new record which is the latest date i.e start date 1-aug-2011 and end date 30-aug-2011 old record will be
    start date 1-jul-2011 and 20-jul-2011
    For the above table data i need to get the data as below
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_CODE OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE START_DATE END_DATE
    299 223 224 334 335 20-JUL-11 30-AUG-11
    300 500 501 400 401 20-JUN-11 20-JUL-11
    Please suggest me to get the above result based on the data. Please let me know if my posts are not clear
    Thanks
    Sudhir

    SELECT  EMPLOYEE_ID,
            OLD_DEFINITION_REGION_CODE,
            NEW_DEFINITION_REGION_CODE,
            OLD_DEFINITION_DISTRICT_CODE,
            NEW_DEFINITION_DISTRICT_CODE,
            OLD_DEFINITION_TERRITORY_CODE,
            NEW_DEFINITION_TERRITORY_CODE,
            START_DATE,
            END_DATE
      FROM  (
             SELECT  EMPLOYEE_ID,
                     ROW_NUMBER() OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE DESC) RN,
                     LAG(DEFINITION_REGION_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_REGION_CODE,
                     DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE,
                     LAG(DEFINITION_DISTRICT_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_DISTRICT_CODE,
                     DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE,
                     LAG(DEFINITION_TERRITORY_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_TERRITORY_CODE,
                     DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE,
                     LAG(END_DATE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) START_DATE,
                     END_DATE
               FROM  ROSTER
      WHERE RN = 1
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE OLD_DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE OLD_DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE START_DAT END_DATE
            299                        223                        224                          334                          335                           445                           446 20-JUL-11 30-AUG-11
            300                        500                        501                          400                          401                           300                           301 20-JUN-11 20-JUL-11
    SQL>  SY.

  • Getting hex value and coordinates of pixel

    Gud day! I just want to ask if getting the hexadecimal value and coordinates of the pixel are possible? Is there a class than can do this?

    Some things are not clear yet. Do you want to access a pixel from the screen or from an image? If image: what kind of image are you working with - BufferedImage? With "value" do you mean the RGB(A) value of the pixel? About coordinates: Usually you need to know the coordinates of the pixel you want to access.
    Assuming you have a BufferedImage and want to get the RGB value of - say - the pixel at (10,15) and display that value as a hex string:
    BufferedImage bufferedImage = ...
    int x = 10;
    int y = 15;
    int rgb = bufferedImage.getRGB(x, y);
    System.out.println(String.format("0x%08x", rgb));

  • Not able to get the Check and send buttons.

    Hi
    I am working on HCM Process n Form, It has integration of Webdynpro, Adobe and Process Forms.
    We can Create and Modify the position in this applications, There is also option for Saving it as Draft and then Opening it and sending it.
    But now when we save it as Draft and try to open it opens the component which has adobe integrated to it but the buttons "Check and Send" and close are not appearing.
    There is an dynamic table populated in a popup and by clicking that link it opens the adobe form in a WDA component window.
    I am not able to figure it out which component it is and how it is done.
    By click of link an action is written which finally fires a plug, The details of this plug i cant find in Windows.
    The main component which opens the pop up is POBJ_BROWSER There is no used Components in this Component apart from ALV Table and SELECT OPTIONS
    and the final code which we can see after click of link is
    methods Fire_pobj_click_overview_Evt
    importing
    ATTRIBUTES type Pobjt_Level_Attribute
    BROWSER_CONTEXT type String
    COLUMN_NAME type String
    LEVEL_GUID type Pobj_Level_Guid ."#EC NEEDED
    If there is any one who have worked on this or any helpfull documents regd this Please let me know
    Thanks & Regards,
    Deepak.B

    Supposed to post in HCM Forum.

  • Trying to convert a pdf to a word doc using Acrobat XI Pro. I am getting formatting errors and scrambled text, especially right below headings. Not all headings affected, just some, but all the same paragraph tag. Any ideas?

    I am trying to convert a pdf  to a word doc. The pdf was created in Framemaker. I am using Acrobat XI Pro and getting formatting errors and scrambled (or missing) text, especially below a heading. Any fixes?

    Hi pakbecker,
    Please try updating to Acrobat 11.0.7 and check.
    In case you still face issues,  i would like to have a look at th doucment.
    Send me an email at [email protected]
    Regards,
    Rave

  • Get Javascript values and use them in a servlet?

    Hey
    I have a HTML which has Javascript scripts which I have to get values from (a array to be exact) and pass them to a servlet so I can process the information in a certain way. I cant seem to find a way to do this properly as the servlet is server side and Javascript is client side. How can I implement this?
    Using a quick example example I have
    C:/index.html
    C:/js/script.js
    Index.html contains:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <script type="text/javascript" src="js/script.js">
    </script>
    </head>
    <body>
    a href="javascript:void(0);" id="add"><img src="images/menunew.png" alt="plus" border="0" />
    /a>
    </body>
    </html>
    Script.js contains:
    var Script = Class.create({
    a:4,
    b:5,
    add: function(){       
    return (this.a + this.b);
    (Ignore syntaxis errors as this is a quick example I wrote up just to see if you can give me a practical example on how to read it.)
    How can from a Java servlet access a and b from the script.js file (which contains a class named Script) and also access the function add which returns that value?
    Thank you for the help
    Edited by: 902756 on 16-dic-2011 0:18

    DrClap wrote:
    902756 wrote:
    1: Yes, it seems like the logically answer but Im not too up on AJAX and even less on mixing it up with servlets. Do you mind giving me a simple add (function) sample or something similar?You are looking at it the wrong way. What you actually want to do is to have the browser send a request (which somehow contains that Javascript data) to a URL which causes the servlet to receive the data. There's no "mixing it up" going on there. The client and the server are entirely separate.
    And since that request would be an HTTP request, it's just text. There's no concept in HTTP of transmitting objects, whether they be Javascript objects or Java objects. Anything you want to transmit has to be converted into text by the sender and converted back into objects by the receiver.
    So there's no such thing as "a simple add function". You're going to have to stop thinking in that way and start thinking of client-server systems in the way they actually are.The thing is I want to start simple to grab a simple concept....
    Im trying a AJAX route and I have the following:
    /index.html
    /js/Adding.js
    Index contains:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
         <title></title>
         <script type="text/javascript" src="js/Adding.js"></script>
    </head>
    <body>
    <select name="num1">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    </select>
    <select name="num2">
    <option value="5">5</option>
    <option value="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    </select>
    <form method="get" name="adding">
    Do
    <span id="res"></span>
    </form>
    </body>
    </html>
    Adding.js contains
    var Adding = Class.create({
    x: null,
    y: null,
    add: function()
         var xmlHttp = new XMLHttpRequest();
         var value1 = document.getElementById("num1").value;
    var value2 = document.getElementById("num2").value;
         xmlHttp.open("GET", "index.html", false);
         xmlHttp.send(value1 + value2);
         var result = document.getElementById("res");
         result.innerHTML = xmlHttp.responseText;
    This shows 2 comboboxes full of numbers and link saying "Do" which calls the javascript function and adds the two numbers in the comboboxs and shows them on the screen without refreshing the page. This does not work and I would like this to work before I continue onto the bigger picture.

  • How to get SCOM alerts and send single summary email of one's that have breached.

    Hi,
    I'm trying to create a runbook which does as the title suggests, ie I want to get the 'Active' alerts from the console which have breached our SLA, which is No Critical or Warning alerts in resolution state of New for more than 24 hrs, and emails this list
    to an internal Distribution List of all the potential service owners.  Its just intended as a daily email to poke the relevant people not to ignore the console alerts :-)
    I'm able to Get Alerts OK, but from there I'm having diffs.  I have been given a powershell (as I'm no good at Powershell myself) which does the filtering to get the relevant breached alerts, but when I pass output to other activities and ultimately
    to the create/send email, I end up only able to get multiple emails, one be alert which matches the filtering from powershell.  I have appended to a file to check that I can write the alert properties line by line, but for example if Ive 4 alerts then
    I end up with 4 emails - I want one email with each alert detail (severity, Alert name, path,resolutionstate, Days/hrs in breach, Service Owner (custom Field 3) etc).  I have toyed with flattening the output with line breaks and/or commas at various points
    along the activity chain to ftry force a single iteration of te send email but this just messes the format to the point of not being useful.
    So was wondering if anyone could advise if this is possible, esp if able to do it using the standard activities  along with SCOM IP - I'm sure doing it all in powershell it a possible answer but I'm not proficient to do it - unless someone can provide
    said script! :-)
    Another possibility which has crossed my mind is to possible query the OpsMgr DB directly using the Alert ID from Get Alert but haven't tried tht yet.  I think I' stuggling to understand the basic of how the data is passed from activities esp using
    the 'flatten outpout method..  My current runbook has the fllowing activities:
    GetAlert -> Run .Net (powershell for filtering for breaced alerts) -> AppendFile (to Check the alert output) -> Create/Send Email(to send summary email).  What happens is if I have say 4 Breached emails in Console, when I run tester I
    see GetAlert runs Once detail shows it has found 4 alerts), then each activity up the chain runs 4 times so that finally I end up with 4 emails.
    If anyone has any suggestions it would be much appreciated - I can provide any more details/upload pic of current runbook if it helps...
    Thanks...

    Hi thanks for the suggestion.  I've tried playing around with the runbook using the Junction activity infront of the sendmail.  It doesnt appear to do anyting in itself (unless I'm not using it correctly).  The only way I can get the email
    to only send once is if I flatten the output from the returned data behaviour - this works if I flatten at the Get Alert stage without the Junction activity or if I use the junction an flatten it then the email fires once.
    However the problem with this is that each field for each alert is written vertically, so if I have 3 alerts returning 3 pieces of returned data I get:
    <Alert1 datafield1>
    <Alert2 datafield1>
    <Alert3 datafield1>
    <Alert1 datafield2>
    <Alert2 datafield2>
    <Alert3 datafield2>
    <Alert1 datafield3>
    <Alert2 datafield3>
    <Alert3 datafield3>
    wereas I wan the dat to appear in horizonally with each alert details on each row as like when written to a file, ie
    <Alert1 datafield1> <Alert1 Datafield2> <Alert1 DataField3>
    <Alert2 datafield1> <Alert2 Datafield2> <Alert2 DataField3>
    <Alert3 datafield1> <Alert3 Datafield2> <Alert3 DataField3>
    Without the use of flatten, the email which fires once for each alert has the data displayed correctly.  So essentially what I'm hoping to get is all returned alert details one per line/row in the body of the email...
    If theres any easy way to do it withing the orchestrator activities would be great.  Otherwise it looks like I might have to try find a powershell or SQL script to pull back alert data.  Cheers...

  • Get the  value and pass it to child jsp page

    Hi All,
    I want to get the attribute value from the adf table in my parent jsp page and again send it to the child jsp page.I'm very new to adf.Please any body give me a example for this.Please help me.
    Thanks in advance!

    Sorry......
    I'm using Jdeveloper 11.1.1.5 version.In my adf application i have two jsp pages.One is parent.jspx and another one is child.jspx.In my parent.jspx page i have adf table.Now i want to get the attribute value from adf table which is in parent.jspx page and i want to send that values to the child.jspx page.How can i do this.Please give me the example.
    Thanks!

  • TS3772 I made a 3 minute movie with my iphone 4s. when I attempt to share it by message or email, a message says the movie is too long and that I must make clips. Is there any way to get around this and send the whole video? I think everything is in the c

    I made a 3-minute movie with my iphone 4S. When I attempt to share it via email or message I get a message that says it is too long, that I should try to make a clip. Of course I had rather send the whole thing. What are the possibilities? I think my music and likely my videos and pictures are in the cloud.

    SadisticIron wrote:
    i just baught my first iphone and it is a jalbroken
    Buzz! Thank you for playing!
    Discussing jailbroken devices is forbidden here by the Terms of Service.
    You can not get help here.

  • Use VO to get DB value and set attribute

    Hi,
    I am working a page to create new order. I need some information populate. This is my code, which somehow not work
    public void createOrder() //(String[] args)
    OAViewObject vo = (OAViewObject)getxxMobileOrderVO1();
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    // Populate support information
    xxMobileSupportVOImpl sptVo = (xxMobileSupportVOImpl)getxxMobileSupportVO1();
    if (sptVo == null)
    MessageToken[] errTokens = {new MessageToken("OBJECT_NAME", "xxMobileSupportVO1")};
    throw new OAException("PER", "XXBOL_OAF_OBJECT_NOT_FOUND", errTokens);
    sptVo.initSupport();
    Row sptRow = sptVo.getCurrentRow();
    if (sptRow != null) {
    row.setAttribute("SupportPersonId", sptRow.getAttribute("PersonId"));
    row.setAttribute("SptName", sptRow.getAttribute("FullName"));
    row.setAttribute("SptEmail", sptRow.getAttribute("EmailAddress"));
    The VO xxMobileSupportVO is a simple select returns one records:
    SELECT ppx.person_id
    , ppx.employee_number
    , ppx.full_name
    , ppx.email_address
    --, lk.tag
    FROM fnd_lookup_values lk
    , per_people_x ppx
    WHERE lk.lookup_type = 'XXXX'
    AND lk.lookup_code = ppx.employee_number
    AND lk.enabled_flag = 'Y'
    AND lk.LANGUAGE = USERENV('LANG')
    AND lk.tag =
    ( SELECT MAX(NVL(tag, 0))
    FROM fnd_lookup_values
    WHERE lookup_type = 'XXXX'
    AND TRUNC(SYSDATE) BETWEEN lk.start_date_active
    AND NVL(lk.end_date_active, hr_general.END_OF_TIME)
    The VO is correctly attached to AM. I use Test feature to be sure it does get value.
    However, when the page is opened and createOrder method is called. The field does not get value populated.
    Does anyone can tell what is the issue?
    Thanks in advance.
    Rudoph

    Are you executing the VO query?
    I suppose you are executing it in sptVo.initSupport();
    If not first execute the VO using sptVo.executeQuery()
    After executing the query, do sptVO.first().
    This will give you the row of the VO.
    Then do your work based on that.
    Regards,
    Peddi.

  • Can I get the Trash and Send folder in IMAP

    Hi,
    I work now for a mail aplication using IMAP. I connect to Microsoft Exchange Server and my question is if there is a posibility to find which folder is the TRASH and which one is the SEND folder. The idea is that I can not use the name because I don't know which IMAP server the users will use (I mean the server can be in different languages and then the folders will have different names).
    Thanks in advance,
    Catalin Tileaga

    One thing you can consider if you're using Exchange 2000 is to use the WebDAV protocol for accessing the server. If you're using Exchange 5.5 you might consider using CDO. Both protocols would allow you to get the real name of the Trash and Sent folders programmatically so that you don't have to rely on a hardcoded name. See the link below for more information...
    Skip O'Grudnick
    http://www.compoze.com/

  • Get Min value and another column value from the same row

    hi all - for each customer and product, I need to grab the row that has the min value for field Value1. I could've just done group by on customer and product and min on Value1, but I also need to grab Vlaue2 from the same row where the minimum value for
    Value1 lies.
    DECLARE @Temp TABLE (CustomerID INT, ProductID VARCHAR(10), Trans_Date Date, Value1 INT, Value2 INT)
    INSERT INTO @Temp VALUES (123, 'ABC', '1/1/2013', 10, 100)
    INSERT INTO @Temp VALUES (456, 'ASD', '1/1/2013', 40, 500)
    INSERT INTO @Temp VALUES (456, 'ASD', '2/1/2013', 90, 700)
    INSERT INTO @Temp VALUES (123, 'ABC', '2/1/2013', 20, 700)
    SELECT * FROM @Temp
    The output should be
    123, ABC, 10, 100
    456, ASD, 40, 500
    I know that I can just join the table to itself and get the desired output but I am dealing with a table that has millions of rows and I was hoping there is more efficient way to do this. any help would be highly appreciated...

    Here is a correction on your DDL to make it into nearly valid table.
    CREATE TABLE Sales
    (customer_id INTEGER NOT NULL,
    product_id CHAR(10) NOT NULL,
    transaction_date DATE NOT NULL,
    PRIMARY KEY (customer_id, product_id, transaction_date),
    value1 INTEGER NOT NULL,
    value2 INTEGER NOT NULL);
    Here is the current syntax for insertion:
    INSERT INTO Sales
    VALUES (123, 'abc', '2013-01-01', 10, 100),
    (456, 'asd', '2013-01-01', 40, 500),
    (456, 'asd', '2013-02-01', 90, 700),
    (123, 'abc', '2013-02-01', 20, 700);
    WITH
    X
    AS
    (SELECT customer_id, product_id, transaction_date, value1, value2,
    MIN(value1) OVER () AS value1_min
    FROM Sales)
    SELECT X.*
    FROM X
    WHERE X.value1_min = X.value1;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

Maybe you are looking for