 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Answers &#187; Embedded SQL</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/embedded-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 00:35:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Embedded SQL Update Query</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-update-query/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-update-query/#comments</comments>
		<pubDate>Wed, 13 Jun 2012 10:42:52 +0000</pubDate>
		<dc:creator>RamvishakRamesh</dc:creator>
				<category><![CDATA[Embedded SQL]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[New Discussion Post by Sureyz]]></description>
				<content:encoded><![CDATA[New Discussion Post by Sureyz]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-update-query/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Delete query in Embedded SQL</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/delete-querry-in-embedded-sql/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/delete-querry-in-embedded-sql/#comments</comments>
		<pubDate>Wed, 30 May 2012 05:18:00 +0000</pubDate>
		<dc:creator>RamvishakRamesh</dc:creator>
				<category><![CDATA[Embedded SQL]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[New Answer by rajsubhyd]]></description>
				<content:encoded><![CDATA[New Answer by rajsubhyd]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/delete-querry-in-embedded-sql/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AS400 &#8211; SQLRPGLE</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-sqlrpgle/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/as400-sqlrpgle/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 09:49:19 +0000</pubDate>
		<dc:creator>rajeshece</dc:creator>
				<category><![CDATA[AS/400 Display File]]></category>
		<category><![CDATA[AS400 - Embedded SQL]]></category>
		<category><![CDATA[Dynamic SQL]]></category>
		<category><![CDATA[Embedded SQL]]></category>
		<category><![CDATA[SQLRPGLE]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi, We are moving Values to Database Fields using Embedded SQL Concept. In Embedded SQL, We can decide the Variable Names dynamically. Is it possible with Display File? why?]]></description>
				<content:encoded><![CDATA[<p>Hi,<br/><br/> We are moving Values to Database Fields using Embedded SQL Concept. In Embedded SQL, We can decide the Variable Names dynamically. Is it possible with Display File? why?<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/as400-sqlrpgle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Select substring from clob-field with sql</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/select-substring-from-clob-field-with-sql/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/select-substring-from-clob-field-with-sql/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 15:03:33 +0000</pubDate>
		<dc:creator>DanTheDane</dc:creator>
				<category><![CDATA[Embedded SQL]]></category>
		<category><![CDATA[RPG]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SUBSTR]]></category>
		<category><![CDATA[Variable Length Subnet Mask]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[New Answer by MTidmarsh]]></description>
				<content:encoded><![CDATA[New Answer by MTidmarsh]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/select-substring-from-clob-field-with-sql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RPGLE Embedded SQL Not null</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/rpgle-embedded-sql-not-null/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/rpgle-embedded-sql-not-null/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 15:33:58 +0000</pubDate>
		<dc:creator>NickHutcheson1</dc:creator>
				<category><![CDATA[AS/400]]></category>
		<category><![CDATA[Embedded SQL]]></category>
		<category><![CDATA[RPGLE]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[RPGLE Embedded SQL is getting a SQL0305 (SQLcid-305, sqlstate 22002) when fetching the next record from a view.  This is pointing to null values encountered.  /free                                                   exec sql                                                fetch next from C1 into :wtclaims                  ;  /end-free                                          Wtclaims is an Externally Described Data structure. There could be null values in any field in the ds over [...]]]></description>
				<content:encoded><![CDATA[<p>RPGLE Embedded SQL is getting a SQL0305 (SQLcid-305, sqlstate 22002) when fetching the next record from a view.  This is pointing to null values encountered.<br/><br/>
<pre> /free                                                   exec sql                                                fetch next from C1 into :wtclaims                  ;  /end-free                                         </pre>
<p><br/><br/> Wtclaims is an Externally Described Data structure. <br/><br/> There could be null values in any field in the ds over the files.<br/><br/> What are mt options to handle null values?<br/><br/> Ihave noted code where &#8216;not null&#8217; is used.  Do I have to do this for each field?  Can something be done for the whole DS or as a compile option?<br/><br/> Thanks, <br/><br/> Nick    <br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/rpgle-embedded-sql-not-null/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Embedded SQL using SUM or some other method to total up qty and display 1 unique record</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-using-sum-or-some-other-method-to-total-up-qty-and-display-1-unique-record/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-using-sum-or-some-other-method-to-total-up-qty-and-display-1-unique-record/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 11:30:03 +0000</pubDate>
		<dc:creator>Dobie</dc:creator>
				<category><![CDATA[Embedded SQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Select]]></category>
		<category><![CDATA[SQL Select statement problem]]></category>
		<category><![CDATA[SQLRPG]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I have an sqlrpgle pgm setup, I want to add another sql select statement. I have a file that contains barcode label data, where multiple records can be assigned to the same Master serial #. My sqlrpg pgm is display various sorts in a screen inquiry. I want to setup my select, to display one [...]]]></description>
				<content:encoded><![CDATA[<p>I have an sqlrpgle pgm setup, I want to add another sql select statement. I have a file that contains barcode label data, where multiple records can be assigned to the same Master serial #. My sqlrpg pgm is display various sorts in a screen inquiry. I want to setup my select, to display one record for each MASTER serial #(acsr2), and display how much total qty (add up SHQT for each ACSR2 field)  is assigned to each master serial #.  I am not sure of the syntax to use in embedded sql to do this.  I need help on the correct syntax to use to build the SQL Select statement to do this function. <br/><br/> Sample of Data:<br/><br/>  [<br/><br/>
<pre>CUCD SCSR2      ACSR2      SHQT     SHDT      AM         51        166        1  20110509  AM         52        166        1  20110509  AM         53        165        1  20110510  AM         54        165        1  20110510  AM         55        165        1  20110510  AM         56        170        1  20110518  AM         57        170        1  20110518  AM         58        170        1  20110519  AM         59                   1  20110519  AM         60        170        1  20110519  AM         61                   1  20110520 <br/><br/> p]AM         61                     1              20110520 <br/><br/> <br/><br/> Example of one of my built select statements:<br/><br/> <br/><br/> </pre>
<p><br/><br/> 0113.01                                                                   0113.02  * loaded racks    not shipped .............                      0113.04 D Sel3            s            100a   inz('WHERE cucd = ''AM'' -  0113.05 d                                     and shnm = ''     '' -      0113.06 d                                     ORDER BY acsr2')            0113.07                                                                   0113.08                                                                   <br/><br/>                                       <br/><br/> <br/><br/> So what I want displayed is:<br/><br/> <br/><br/> MASTER SER#              ASM COUNT          SHIP DATE<br/><br/> 165                                     3               5/10/2011<br/><br/>  <br/><br/><br/><br/><br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-using-sum-or-some-other-method-to-total-up-qty-and-display-1-unique-record/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Embedded SQLRPGLE Books, guides, how to&#8217;s</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sqlrpgle-books-guides-how-tos/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sqlrpgle-books-guides-how-tos/#comments</comments>
		<pubDate>Tue, 10 May 2011 18:33:09 +0000</pubDate>
		<dc:creator>NickHutcheson1</dc:creator>
				<category><![CDATA[Embedded SQL]]></category>
		<category><![CDATA[IT Books]]></category>
		<category><![CDATA[Open IT Forum]]></category>
		<category><![CDATA[Reference Guides]]></category>
		<category><![CDATA[SQLRPGLE Books]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Does anyone know of some good SQL books for RPGLE other than the IBM manuals? I need to learn more to keep afloat!]]></description>
				<content:encoded><![CDATA[<p>Does anyone know of some good SQL books for RPGLE other than the IBM manuals? I need to learn more to keep afloat!</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sqlrpgle-books-guides-how-tos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Embedded SQL in RPGLE hdr, dtl fetch for subfile build</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-in-rpgle-hdr-dtl-fetch-for-subfile-build/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-in-rpgle-hdr-dtl-fetch-for-subfile-build/#comments</comments>
		<pubDate>Tue, 10 May 2011 16:46:43 +0000</pubDate>
		<dc:creator>NickHutcheson1</dc:creator>
				<category><![CDATA[AS/400 Subfiles]]></category>
		<category><![CDATA[Embedded SQL]]></category>
		<category><![CDATA[Header]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLRPGLE]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I am trying to join a header and a detail file and select all fields into data structures defined as external(filename). D dswtchdr      E DS                  EXTNAME(wtchdr) D dswtcdet      E DS                  EXTNAME(wtcdet) C     $CreateCsr    Begsr C/EXEC SQL C+ prepare S1 from :sqlstmt C/end-exec  * C/EXEC SQL C+ declare C1 scroll cursor for S1 C/end-exec C                   EndSr [...]]]></description>
				<content:encoded><![CDATA[<p>I am trying to join a header and a detail file and select all fields into data structures defined as external(filename).<br/><br/>
<pre><br/><br/> D dswtchdr      E DS                  EXTNAME(wtchdr) D dswtcdet      E DS                  EXTNAME(wtcdet) <br/><br/> C     $CreateCsr    Begsr C/EXEC SQL C+ prepare S1 from :sqlstmt C/end-exec  * C/EXEC SQL C+ declare C1 scroll cursor for S1 C/end-exec C                   EndSr  *================================================================ C     $OpenCsr      Begsr C/exec sql C+ open C1 C/end-exec C                   EndSr                              sqlbase = ‘SELECT * ‘                                              +               ‘from wtchdr inner join wtchdet ‘                      +               ‘ on wtchdr.whcnum = wtchdet.wdcnum ‘                  +               %trim(whereclause)                                      +                    (orderbyclause)                                    ; sqlstmt =%trim(sqlbase)                                               ; <br/><br/> C/exec sql C+ fetch next from C1 into :dswtchdr C/end-exec                                         <br/><br/> </pre>
<p> On the fetch next, the header data structure receives all data from the row selected. How do I include the detail?<br/><br/> Thx, Nick<br/><br/>  The only way that I can think of quickly that might make it work is to CREATE VIEW over a JOIN of the two files. Then reference the VIEW name in EXTNAME() for a single E DS. You don’t actually need to use the VIEW for anything other than that reference. That  is, you don’t need to SELECT from it if you don’t want to. The pre-compiler will only detect one DS for one SELECT. There is only a single set of columns in the returned result set.<br/><br/> Tom<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/embedded-sql-in-rpgle-hdr-dtl-fetch-for-subfile-build/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to handle record lock using embedded SQL?</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-handel-record-lock-using-embedded-sql/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/how-to-handel-record-lock-using-embedded-sql/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 14:05:56 +0000</pubDate>
		<dc:creator>Samule400</dc:creator>
				<category><![CDATA[AS/400 SQL]]></category>
		<category><![CDATA[Embedded SQL]]></category>
		<category><![CDATA[Embedded SQL in AS/400]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLRPGLE]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I am using SQLRPGLE program,need to handle record lock in sql statement ..plz suggest?]]></description>
				<content:encoded><![CDATA[<p>I am using SQLRPGLE program,need to handle record lock in sql statement ..plz suggest?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/how-to-handel-record-lock-using-embedded-sql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Selecting Field Defined as L in SQL Server</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/selecting-field-defined-as-l/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/selecting-field-defined-as-l/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 19:06:21 +0000</pubDate>
		<dc:creator>Canuhp</dc:creator>
				<category><![CDATA[Date convert]]></category>
		<category><![CDATA[Embedded SQL]]></category>
		<category><![CDATA[Field Defined L]]></category>
		<category><![CDATA[SQL Server development]]></category>
		<category><![CDATA[V6R1]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I am building 4 part SQL select across 4 files using union alls. All 4 files have a date field which is one of the fields I am selecting. My problem is that on one file the date field is defined as L type where the other three files have a date field defined as [...]]]></description>
				<content:encoded><![CDATA[<p>I am building 4 part SQL select across 4 files using union alls. All 4 files have a date field which is one of the fields I am selecting. My problem is that on one file the date field is defined as L type where the other three files have a date field defined as 8S 0. Since the field I am selecting into has to be compatible across all 4 files and L data type is not an option in RPG&#8230;.  How can I define or convert this L field so that it will pull it in to the D data type field I currently have defined? Or how can I define the field I am fetching into so that it will be compatible across all 4 files?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/selecting-field-defined-as-l/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/14 queries in 0.024 seconds using memcached
Object Caching 934/1012 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-21 04:08:53 -->