>Can anyone help with this please!
First, un-nest your joins.SELECT Assets.asnum, Assets.sub, Assets.aexistnum, Assets.asdes,;
Assets.asser, Assets.aloc, Assets.adep, Assets.price, Assets.invoice,;
Assets.acost, Assets.Trans_sold, Locate.locphone, Locate.person, Locate.exist, Udep.desc1;
FROM baud!locate ;
INNER JOIN baud!assets;
ON Locate.locnum = Assets.aloc;
INNER JOIN baud!udep ;
ON Udep.dep = Assets.adep ;
WHERE Assets.adep = madep;
AND Assets.astyp = mastyp;
AND Assets.aloc = mloc;
AND (Assets.trans_sold = " " .or. Assets.trans_sold = "I") ;
ORDER BY Assets.adep, Assets.aloc, Assets.asnum;
INTO TABLE temp.dbf
>
>the above code works fine.
>
>i have tried to use the sqlprepare() command but with no success..this is as far as i got :
>
>=sqlprepare(gnConnHandle,'select Assets.asnum, Assets.sub, Assets.aexistnum, Assets.asdes, Assets.asser, Assets.aloc, Assets.adep, Assets.price, Assets.invoice, Assets.acost, Assets.Trans_sold, Locate.locphone, Locate.person, Locate.exist, Udep.desc1 from assets,locate,udep WHERE assets.adep = madep ' ,'temp.dbf')
>
>Can anyone please help with this?
Did you intend to use SQLPrepare() with a SQL statement that is different from the one above it?
Mark McCasland
Midlothian, TX USA