|
With all due respect, the below does not work. "Argument 1 of function YEAR not valid" because the year function only works on dates, not "numbers". Trying "set ststrdt = year(date('2000-01-01'))" results in "Value for column or variable XXX not compatible." because you are setting a date to a single integer value (year). Please see my previous post for a solution. Not pretty, but works. Thanks, Loyd -----Original Message----- From: Carel Teijgeler [mailto:coteijgeler@chello.nl] Sent: Thursday, August 01, 2002 3:26 PM To: midrange-l@midrange.com Subject: Re: Error on update in SQL Hello Ron, I do not think you can use a function that way on a SET statement. Perhaps SET STSTRDT = year(2000) may work. Regards. Carel Teijgeler ======= At 2002-08-01, 13:39:00 you wrote: ======= >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. > >UPDATE rcaprjh/RCDSC SET year(STSTRDT) = 2000 >Token ( was not valid. Valid tokens: =. = = = = = = = = = = = = = = = = = = = = _______________________________________________ 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.