Subject Re: SIMPLE SQL STATEMENT
From Mustansir Ghor <mustan31@hotmail.com>
Date Fri, 11 Aug 2017 15:01:28 -0400
Newsgroups dbase.getting-started

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.

Any lead what this error means.

Best Regards
Mustansir

Mervyn Bick Wrote:

> On 2017-08-08 4:46 PM, Mustansir Ghor wrote:
> > Dear All
> >
> > DT={11/12/2016}
> > INSERT INTO ACCSALES SELECT * FROM SALESCR S WHERE S."DATE"=:DT
> >
> > both are DBF files. ACCSALES has all the fields that are in SALESCR and in addition 5 more. Is this reason it gives error "invalid parameter"
> >
> >
>
> Probably.  You can only omit the field list in an INSERT statement if
> you are providing values for all the field with the values in the same
> order.
>
> If the 5 extra fields are at the end of the record in the first table
> then try the following.
>
>
>   DT={11/12/2016}
>   INSERT INTO ACCSALES (fld1,fls2,fld3...fldn)  SELECT * FROM SALESCR S
> WHERE S."DATE"=:DT
>
> If the extra fields are not all grouped together at the end of the
> record then you will need to do the following.
>
>   DT={11/12/2016}
>   INSERT INTO ACCSALES (fld1,fld3,fld5) SELECT fld1,fld3,fl5 FROM
> SALESCR S WHERE S."DATE"=:DT
>
>
> Mervyn.