<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Salesforce SOQL not returning correct value in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212068#M9843</link>
    <description>This is my code, if it help anyone to help me 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;Private Sub btnRtvOutlook_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRtvOutlook.Click&lt;BR /&gt;        ' *** Delete all records in databse, which has been uploaded today&lt;BR /&gt;        Dim myConnection As New System.Data.SqlClient.SqlConnection(myConnString)&lt;BR /&gt;        Dim myQuery As String = "DELETE FROM tblXIST_ESR_OPP WHERE DATEDIFF(day, UPLOAD_TIME, GETDATE()) = 0"&lt;BR /&gt;        Dim myCommand As New System.Data.SqlClient.SqlCommand(myQuery, myConnection)&lt;BR /&gt;        myCommand.Connection = myConnection&lt;BR /&gt;        myCommand.Connection.Open()&lt;BR /&gt;        myCommand.ExecuteScalar()&lt;BR /&gt;        myCommand.Parameters.Clear()&lt;BR /&gt;        myCommand.Connection.Close()&lt;BR /&gt;        myConnection.Close()&lt;BR /&gt;        ' *** INSERT TODAYS OUTLOOK INFORMATION INTO THE DATABASE&lt;BR /&gt;        Dim qs As String&lt;BR /&gt;        'This one works perfectly at returns the Unit_Revenue__c result being "26000"&lt;BR /&gt;        'qs = "SELECT Id, Unit_Revenue__c FROM Equipment_Data__c"&lt;BR /&gt;        'This one also works and returns the deal type perfectly being "Cash"&lt;BR /&gt;        'qs = "SELECT Id, Deal_Type__c FROM Equipment_Data__c"&lt;BR /&gt;        'This one also works, and return both field being "26000 - Cash" &lt;BR /&gt;        'qs = "SELECT Id, Unit_Revenue__c, Deal_Type__c FROM Equipment_Data__c"&lt;BR /&gt;        'This one doesn't work, it only returns "- - 14-06-2012 11:09:59"&lt;BR /&gt;        qs = "SELECT Id, Unit_Revenue__c, Deal_Type__c, CreatedDate FROM Equipment_Data__c"&lt;BR /&gt;        Dim qr As apex.QueryResult = binding.query(qs)&lt;BR /&gt;        If (qr.size = 0) Then&lt;BR /&gt;        Else&lt;BR /&gt;            For i As Integer = 1 To qr.records.GetUpperBound(0)&lt;BR /&gt;                Dim equipment As apex.Equipment_Data__c = CType(qr.records(i), apex.Equipment_Data__c)&lt;BR /&gt;		&lt;BR /&gt;		'*** HERE I NORMALLY HAVE A FUNCTION THAT RETURNS THE VALUES INTO A SQL DATABASE, BUT&lt;BR /&gt;		'*** I HAVE CUT IT OUT TO REDUCE PLACES OF ERRORS AND ARE ONLY RETURNING VALUES IN MSGBOX&lt;BR /&gt;                MsgBox(equipment.Unit_Revenue__c &amp;amp; " - " &amp;amp; equipment.Deal_Type__c &amp;amp; " - " &amp;amp; equipment.CreatedDate)&lt;BR /&gt;&lt;BR /&gt;            Next&lt;BR /&gt;        End If&lt;BR /&gt;End Sub&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Jul 2012 09:24:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-07-09T09:24:43Z</dc:date>
    <item>
      <title>Salesforce SOQL not returning correct value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212064#M9839</link>
      <description>Hi, 
&lt;BR /&gt;Can anyone explain me why this select: 
&lt;BR /&gt;"SELECT Id, Unit_Price__c, CreatedById, CreatedDate, Deal_Type__c FROM Equipment_Data__c" 
&lt;BR /&gt;Returns a null value "Unit_Price__c" while 
&lt;BR /&gt;"SELECT Id, Unit_Price__c, CreatedById, CreatedDate FROM Equipment_Data__c" 
&lt;BR /&gt;Returns a correct value... 
&lt;BR /&gt;I'm really puzzled with this!? So any help is appriciated.. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Wed, 04 Jul 2012 14:18:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212064#M9839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-04T14:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce SOQL not returning correct value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212065#M9840</link>
      <description>Just to clarify further, this is SOQL Select from SalesForce.com... 
&lt;BR /&gt;If I do: 
&lt;BR /&gt;"SELECT Unit_Price__c, Deal_Type__c FROM Equipment_Data__c", I will get the correct Deal_Type__c, but no value for Unit_Price. 
&lt;BR /&gt;If I do: 
&lt;BR /&gt;"SELECT Unit_Price__c FROM Equipment_Data__c", I will get the correct Unit_Price__c 
&lt;BR /&gt;Unit_Price__c is a "Number(16,2)" field and Deal_Type__c is a "Picklist" field.... 
&lt;BR /&gt;Any ideas?</description>
      <pubDate>Wed, 04 Jul 2012 14:57:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212065#M9840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-04T14:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce SOQL not returning correct value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212066#M9841</link>
      <description>you have to change your query to get the value of the picklist for SOQL. use
&lt;BR /&gt;SELECT Unit_Price__c, toLabel(Deal_Type__c) FROM Equipment_Data__c</description>
      <pubDate>Thu, 05 Jul 2012 19:13:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212066#M9841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-05T19:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce SOQL not returning correct value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212067#M9842</link>
      <description>It unfortunately doesn't work. For info I that both of the below return correct values: 
&lt;BR /&gt;"SELECT Deal_Type__c FROM Equipment_Data__c" (without toLabel) and the 
&lt;BR /&gt;"SELECT Unit_Price__c FROM Equipment_Data__c" 
&lt;BR /&gt;But when I combine them as: 
&lt;BR /&gt;"SELECT Unit_Price__c, Deal_Type__c FROM Equipment_Data__c" or even "SELECT Unit_Price__c, toLabel(Deal_Type__c) FROM Equipment_Data__c" I only get the Deal_Type__c value - not the Unit_Price__c</description>
      <pubDate>Fri, 06 Jul 2012 07:36:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212067#M9842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-06T07:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce SOQL not returning correct value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212068#M9843</link>
      <description>This is my code, if it help anyone to help me 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;Private Sub btnRtvOutlook_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRtvOutlook.Click&lt;BR /&gt;        ' *** Delete all records in databse, which has been uploaded today&lt;BR /&gt;        Dim myConnection As New System.Data.SqlClient.SqlConnection(myConnString)&lt;BR /&gt;        Dim myQuery As String = "DELETE FROM tblXIST_ESR_OPP WHERE DATEDIFF(day, UPLOAD_TIME, GETDATE()) = 0"&lt;BR /&gt;        Dim myCommand As New System.Data.SqlClient.SqlCommand(myQuery, myConnection)&lt;BR /&gt;        myCommand.Connection = myConnection&lt;BR /&gt;        myCommand.Connection.Open()&lt;BR /&gt;        myCommand.ExecuteScalar()&lt;BR /&gt;        myCommand.Parameters.Clear()&lt;BR /&gt;        myCommand.Connection.Close()&lt;BR /&gt;        myConnection.Close()&lt;BR /&gt;        ' *** INSERT TODAYS OUTLOOK INFORMATION INTO THE DATABASE&lt;BR /&gt;        Dim qs As String&lt;BR /&gt;        'This one works perfectly at returns the Unit_Revenue__c result being "26000"&lt;BR /&gt;        'qs = "SELECT Id, Unit_Revenue__c FROM Equipment_Data__c"&lt;BR /&gt;        'This one also works and returns the deal type perfectly being "Cash"&lt;BR /&gt;        'qs = "SELECT Id, Deal_Type__c FROM Equipment_Data__c"&lt;BR /&gt;        'This one also works, and return both field being "26000 - Cash" &lt;BR /&gt;        'qs = "SELECT Id, Unit_Revenue__c, Deal_Type__c FROM Equipment_Data__c"&lt;BR /&gt;        'This one doesn't work, it only returns "- - 14-06-2012 11:09:59"&lt;BR /&gt;        qs = "SELECT Id, Unit_Revenue__c, Deal_Type__c, CreatedDate FROM Equipment_Data__c"&lt;BR /&gt;        Dim qr As apex.QueryResult = binding.query(qs)&lt;BR /&gt;        If (qr.size = 0) Then&lt;BR /&gt;        Else&lt;BR /&gt;            For i As Integer = 1 To qr.records.GetUpperBound(0)&lt;BR /&gt;                Dim equipment As apex.Equipment_Data__c = CType(qr.records(i), apex.Equipment_Data__c)&lt;BR /&gt;		&lt;BR /&gt;		'*** HERE I NORMALLY HAVE A FUNCTION THAT RETURNS THE VALUES INTO A SQL DATABASE, BUT&lt;BR /&gt;		'*** I HAVE CUT IT OUT TO REDUCE PLACES OF ERRORS AND ARE ONLY RETURNING VALUES IN MSGBOX&lt;BR /&gt;                MsgBox(equipment.Unit_Revenue__c &amp;amp; " - " &amp;amp; equipment.Deal_Type__c &amp;amp; " - " &amp;amp; equipment.CreatedDate)&lt;BR /&gt;&lt;BR /&gt;            Next&lt;BR /&gt;        End If&lt;BR /&gt;End Sub&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jul 2012 09:24:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Salesforce-SOQL-not-returning-correct-value/m-p/2212068#M9843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-09T09:24:43Z</dc:date>
    </item>
  </channel>
</rss>

