Subject Re: SIMPLE SQL STATEMENT
From Mervyn Bick <invalid@invalid.invalid>
Date Fri, 11 Aug 2017 23:30:11 +0200
Newsgroups dbase.getting-started

On 2017-08-11 9:01 PM, Mustansir Ghor wrote:
> Dear All
>
> UPDATE ACCSALES SET REGDATE=REG+DTOS(ACCSALES."DATE")
>
> REG in Char(5)
> REGDATE is Char(13)
>
> The above statement gives error Compatibility not supported.

DTOS() is a dBase function not a SQL function so you can't use it in a
SQL statement.

The symbol for concatenation  (joining two strings)  in SQL is || not +
as in dBASE.

Try the following which is untested so be prepared for it to fail. :-(

Be aware that if you don't add a WHERE clause this will update ALL
records in the table.  Try this on a test table first.


  update accsales set regdate = reg||cast(extract(year from
accsales."date")*10000+extract(month from
accsales."date")*100+extract(day from accsales."date") as char(8))


Mervyn.