<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: SQL update question</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/sql-update-question/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-update-question/</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jun 2013 04:33:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: mmaguy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-update-question/#comment-50942</link>
		<dc:creator>mmaguy</dc:creator>
		<pubDate>Thu, 20 Dec 2007 19:45:43 +0000</pubDate>
		<guid isPermaLink="false">#comment-50942</guid>
		<description><![CDATA[Weird, I had this exact same question...

My problem is that I&#039;m basically doing an interactive update/create file (similar to DFU).
The user is able to maintain a file in the screen, so how do I go about updating the ENTIRE File without having to manually update every record?

I have a datastructure (cpRec) to put in the info from the file using SQL
D cpRec         e ds                  Extname(CUSPRF)  Prefix(cp)

If my screen fields are the exact same fields as the file (except with a sc prefix), how can I update the file with the screen fields without doing

CustNo = :scCustNo,
OrderNo = :scOrderNo,
Locations = :scLocation...and so on...

I thought I could just use another DS for the screen fields
D scRec         e ds                  Extname(CUSPRF)  Prefix(sc)

and then somehow move that into the file:
Exec SQL           
  UPDATE cusprf    
  Set Row = :scRec 

but when I run it I get a data decimal error on the dspf.]]></description>
		<content:encoded><![CDATA[<p>Weird, I had this exact same question&#8230;</p>
<p>My problem is that I&#8217;m basically doing an interactive update/create file (similar to DFU).<br />
The user is able to maintain a file in the screen, so how do I go about updating the ENTIRE File without having to manually update every record?</p>
<p>I have a datastructure (cpRec) to put in the info from the file using SQL<br />
D cpRec         e ds                  Extname(CUSPRF)  Prefix(cp)</p>
<p>If my screen fields are the exact same fields as the file (except with a sc prefix), how can I update the file with the screen fields without doing</p>
<p>CustNo = :scCustNo,<br />
OrderNo = :scOrderNo,<br />
Locations = :scLocation&#8230;and so on&#8230;</p>
<p>I thought I could just use another DS for the screen fields<br />
D scRec         e ds                  Extname(CUSPRF)  Prefix(sc)</p>
<p>and then somehow move that into the file:<br />
Exec SQL<br />
  UPDATE cusprf<br />
  Set Row = :scRec </p>
<p>but when I run it I get a data decimal error on the dspf.</p>
]]></content:encoded>
	</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/8 queries in 0.035 seconds using memcached
Object Caching 269/270 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-19 05:07:25 -->