dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: SQL Server
Expertise: Beginner
Jan 3, 2000

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


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* from
comdb200/actphy01,comdb200/saaphy01,comdb200/bahphy01
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'

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'
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date