date -updation

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
amar
Member
Posts: 4
Joined: Sat Oct 07, 2006 9:43 am

date -updation

Post by amar » Mon Oct 16, 2006 3:54 pm

hi
i am haing date 2006-10-22 and i want to update the day to 30 how to do

plz help?/

ovreddy
Member
Posts: 14
Joined: Sat Oct 07, 2006 4:13 pm
Location: Chennai
Contact:

Post by ovreddy » Mon Oct 16, 2006 4:40 pm

Hi Amar,

Following query will do that

UPDATE EMP_TABLE SET DATE_OF_JOINING='2006-10-30';

or

UPDATE EMP_TABLE SET DATE_OF_JOINING= DATE_OF_JOINING + 8 DAYS;

Regards,
Reddy.

ambilileela
Member
Posts: 11
Joined: Tue Jun 06, 2006 2:12 pm

Post by ambilileela » Tue Oct 24, 2006 11:17 am

HI

THE QUERY IS NOT COMPLETE DO YOU HAVE TO UPDTAE FOR ALL RECORDS OR FOR A SINGLE RECORD.

WHAT EVER BE THE CASE I GUESS YOU WILL HAVE TO INCLUDE THE WHERE CONDITION LIKE AS BELOW

UPDATE TABLE_NAME
SET DATE = EXISTING_DATE+8 DAYS
WHERE <GIVE THE CONDITION HERE>

THANKS,
AMBILI

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others