devxlogo

Updating the End Date Field

Question:
I have written the following SQL statement and want to update only the end date field (saaphy01.n5ajdd) in one file. How can I tell it in my query to do this?

 select* fromcomdb200/actphy01,comdb200/saaphy01,comdb200/bahphy01where saaphy01.n5lwnb = actphy01.b1lwnband bahphy01.ibhxcd = actphy01.b1hxcdand actphy01.b1lknb = bahphy01.iblknband actphy01.b1iast = 'D' and actphy01.b1mbnb between 3.00 and 3.18and bahphy01.ibtidt = 1000101 and saaphy01.n5atcf = '00288'

Answer:
Try this:

 UPDATE saaphy01 SET n5ajdd = MyValue followed by your where clause like this; WHERE saaphy01.n5lwnb = actphy01.b1lwnb AND bahphy01.ibhxcd = actphy01.b1hxcd AND actphy01.b1lknb = bahphy01.iblknb AND actphy01.b1iast = 'D' AND actphy01.b1mbnb between (3.00 and 3.18) AND bahphy01.ibtidt = 1000101 AND saaphy01.n5atcf = '00288'

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Five Early Architecture Decisions That Quietly Get Expensive

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.