<?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 Reading cursor returning from Stored Procedure in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Reading-cursor-returning-from-Stored-Procedure/m-p/2216914#M12730</link>
    <description>Hello,&amp;nbsp;
&lt;BR /&gt;I'm using Talend Open Studio 5.6.1 and MS SQL server (2000). &amp;nbsp;It is possible to retrieve and read a cursor returned from a Stored Procedure call?
&lt;BR /&gt;I've tried using tMSSqlSP without success when calling the sample stored procedure below. I'm trying to get it working first with a simple SP such as the one below. Can anyone give me some tips or point to an example of using tMSSql components (or tMSSqlSP) to call an SP &amp;nbsp;and then read a cursor from it?
&lt;BR /&gt;Thanks very much for any help.
&lt;BR /&gt;Problems&amp;nbsp;
&lt;BR /&gt;
&lt;BR /&gt;How to pass in a reference to an "OUTPUT" cursor into the SP?
&lt;BR /&gt;How to read the cursor that is returned?
&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;CREATE PROCEDURE . &lt;BR /&gt; &amp;nbsp; &amp;nbsp;@myCursor CURSOR VARYING OUTPUT&lt;BR /&gt;AS&lt;BR /&gt; &amp;nbsp; &amp;nbsp;SET NOCOUNT ON;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;SET @myCursor = CURSOR&lt;BR /&gt; &amp;nbsp; &amp;nbsp;FORWARD_ONLY STATIC FOR&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT my_id, my_value&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM dbo.zExample;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;OPEN @myCursor;&lt;BR /&gt;GO&lt;BR /&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Apr 2015 18:35:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-04-20T18:35:05Z</dc:date>
    <item>
      <title>Reading cursor returning from Stored Procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-cursor-returning-from-Stored-Procedure/m-p/2216914#M12730</link>
      <description>Hello,&amp;nbsp;
&lt;BR /&gt;I'm using Talend Open Studio 5.6.1 and MS SQL server (2000). &amp;nbsp;It is possible to retrieve and read a cursor returned from a Stored Procedure call?
&lt;BR /&gt;I've tried using tMSSqlSP without success when calling the sample stored procedure below. I'm trying to get it working first with a simple SP such as the one below. Can anyone give me some tips or point to an example of using tMSSql components (or tMSSqlSP) to call an SP &amp;nbsp;and then read a cursor from it?
&lt;BR /&gt;Thanks very much for any help.
&lt;BR /&gt;Problems&amp;nbsp;
&lt;BR /&gt;
&lt;BR /&gt;How to pass in a reference to an "OUTPUT" cursor into the SP?
&lt;BR /&gt;How to read the cursor that is returned?
&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;CREATE PROCEDURE . &lt;BR /&gt; &amp;nbsp; &amp;nbsp;@myCursor CURSOR VARYING OUTPUT&lt;BR /&gt;AS&lt;BR /&gt; &amp;nbsp; &amp;nbsp;SET NOCOUNT ON;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;SET @myCursor = CURSOR&lt;BR /&gt; &amp;nbsp; &amp;nbsp;FORWARD_ONLY STATIC FOR&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT my_id, my_value&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM dbo.zExample;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;OPEN @myCursor;&lt;BR /&gt;GO&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Apr 2015 18:35:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-cursor-returning-from-Stored-Procedure/m-p/2216914#M12730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-20T18:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading cursor returning from Stored Procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-cursor-returning-from-Stored-Procedure/m-p/2216915#M12731</link>
      <description>Hi,
&lt;BR /&gt;Do you want to pass a cursor to a Mysql Procesure? Could you please give us more details about your job requirment?
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Tue, 21 Apr 2015 08:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-cursor-returning-from-Stored-Procedure/m-p/2216915#M12731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-21T08:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reading cursor returning from Stored Procedure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-cursor-returning-from-Stored-Procedure/m-p/2216916#M12732</link>
      <description>I have a stored procedure in Microsoft SQL Server. &amp;nbsp;The stored procedure returns a cursor, with two fields. Assessment_id, and battery_id. &amp;nbsp; The goal is to call the stored procedure, get the cursor, and for each row in the cursor, &amp;nbsp;split it into the fields it contains. 
&lt;BR /&gt;Here is the final output, &amp;nbsp;stored procedure, TSQL to call it, and screenshots from Talend Studio 
&lt;BR /&gt;In Talend, I used the tMSSqlSP and tParseRecordSet components. 
&lt;BR /&gt;Output from tLowRow 
&lt;BR /&gt; 
&lt;PRE&gt;999|123456&lt;BR /&gt;My hovercraft is full of eels|42&lt;/PRE&gt; 
&lt;BR /&gt;Stored procedure 
&lt;BR /&gt; 
&lt;PRE&gt;CREATE PROCEDURE . &amp;nbsp; &amp;nbsp;&lt;BR /&gt;AS&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SET NOCOUNT ON;&lt;BR /&gt;	DECLARE @batteryAssessmentMappingCursor CURSOR --FORWARD_ONLY READ_ONLY FOR&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT assessment_id, battery_id&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM dbo.TPDB_AssessmentBatteryMapping;&lt;BR /&gt;GO&lt;/PRE&gt; 
&lt;BR /&gt;How to get results out in Microsoft SQL Server Studio 
&lt;BR /&gt; 
&lt;PRE&gt;DECLARE	@return_value int&lt;BR /&gt;EXEC	@return_value = .&lt;BR /&gt;SELECT	'Return Value' = @return_value&lt;BR /&gt;GO&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDNo.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151885i4A288E432E7E95E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDNo.png" alt="0683p000009MDNo.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDOR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157032i39D4B59F9B48FBB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDOR.png" alt="0683p000009MDOR.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 21 Apr 2015 18:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-cursor-returning-from-Stored-Procedure/m-p/2216916#M12732</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-21T18:35:31Z</dc:date>
    </item>
  </channel>
</rss>

