<?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>Question Re: One of the Column returned as NULL from SQL Server 2008 in Product Lifecycle Management Q&amp;A</title>
    <link>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874925#M39659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the syntax you are using to call the stored procedure from MII, I would assume its a problem with your date fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 May 2011 13:07:32 GMT</pubDate>
    <dc:creator>jamie_cawley</dc:creator>
    <dc:date>2011-05-09T13:07:32Z</dc:date>
    <item>
      <title>One of the Column returned as NULL from SQL Server 2008</title>
      <link>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaq-p/7874924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written a stored procedure in SQL server 2008. The procedure reads data into a temporary table &lt;STRONG&gt;@MeterWiseConsumptionBetwDates&lt;/STRONG&gt; as shown&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT @sqlstatement =	'SELECT '''&lt;EM&gt;@MeterName&lt;/EM&gt;''', CAST ( MAX('&lt;EM&gt;@Meterfield&lt;/EM&gt;') AS FLOAT )-CAST ( MIN('&lt;EM&gt;@Meterfield&lt;/EM&gt;') AS FLOAT )&lt;/P&gt;&lt;P&gt;						FROM KWH&lt;/P&gt;&lt;P&gt;						WHERE	KWH.timestamp BETWEEN @StDate AND @EndDate'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT INTO @MeterWiseConsumptionBetwDates(MeterName,Consumption)&lt;/P&gt;&lt;P&gt;EXEC sp_executesql @sqlstatement, N'@StDate datetime, @EndDate datetime', @StDate, @EndDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when I execute the stored procedure in SQL Server Management Studio it returns all the columns from the table &lt;STRONG&gt;@MeterWiseConsumptionBetwDates&lt;/STRONG&gt;, but when I execute the procedure in MII it returns the values in the &lt;STRONG&gt;Consumption&lt;/STRONG&gt; column as null. The &lt;STRONG&gt;MeterName&lt;/STRONG&gt; column is returned correctly in both the cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 May 2011 11:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaq-p/7874924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-07T11:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: One of the Column returned as NULL from SQL Server 2008</title>
      <link>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874925#M39659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the syntax you are using to call the stored procedure from MII, I would assume its a problem with your date fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 13:07:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874925#M39659</guid>
      <dc:creator>jamie_cawley</dc:creator>
      <dc:date>2011-05-09T13:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: One of the Column returned as NULL from SQL Server 2008</title>
      <link>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874926#M39660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried with both&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute &amp;lt;proc name&amp;gt; 'MM/dd/yyyy HH:mm:ss'&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;execute &amp;lt;proc name&amp;gt; to_date('MM/dd/yyyy HH:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But strangely today i added another column to the query. The difference in date in the first date column is a day and in the second its from the start of the month to  now. And it has started returning both the columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: maaz ahmed on May 9, 2011 3:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 13:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874926#M39660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-09T13:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: One of the Column returned as NULL from SQL Server 2008</title>
      <link>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874927#M39661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to hear that it is working.  You should be able to use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;execute &amp;lt;proc name&amp;gt; '[SD]'&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;[SD] and [ED]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; are the query date tokens, so whatever you have assigned on the Date Range tab will be passed to the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jamie Cawley on May 9, 2011 9:40 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 13:39:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874927#M39661</guid>
      <dc:creator>jamie_cawley</dc:creator>
      <dc:date>2011-05-09T13:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: One of the Column returned as NULL from SQL Server 2008</title>
      <link>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874928#M39662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jamie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 04:21:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/product-lifecycle-management-q-a/one-of-the-column-returned-as-null-from-sql-server-2008/qaa-p/7874928#M39662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-10T04:21:44Z</dc:date>
    </item>
  </channel>
</rss>

