|
This works with a date datatype update spendmsa set asofdate = '2000-'||strip(char(month(asofdate)))||'-'|| strip(char(day(asofdate))) Note the 2000 in quote marks. SQL will interpret this as a date after all concatenation and character transformation occurs. I have formatted the date as an ISO (yyyy-mm-dd) for clarity. HTH, Loyd -----Original Message----- From: Klein, Ron [mailto:ron.klein@acs-inc.com] Sent: Thursday, August 01, 2002 1:40 PM To: Midrange List (E-mail) Subject: Error on update in SQL This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- [ Picked text/plain from multipart/alternative ] Hi All, We are trying to do a update to a date type field thru strsql. The statement is shown below. However we keep getting the error that it is invalid. We just want to update the year portion of that date datatype field. Any help would be greatly appreciated. We are at V4R5. UPDATE rcaprjh/RCDSC SET year(STSTRDT) = 2000 Token ( was not valid. Valid tokens: =. TIA Ron _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.