Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending one field only into another table sql statemen
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00580457
Message ID:
00580462
Views:
16
>Can someone please check to see what is incorrect in the syntax of this statement? I am trying to append just the records of one field from a table into another table where the dates are the same in both tables and the records are inserted providing the names are the same in both tables.
>Select tableA.field5 as fieldtotal ;
>FROM tableA INNER JOIN tableB into cursor crsTemp ;
>append from dbf('crsTemp') ;
>ON tableA.namefield = tableB.namefield ;
>WHERE tableA.datefield = tableB.datefield
Here's corrected code
Select tableA.field5 as fieldtotal ;
  FROM  tableA ;
   INNER JOIN tableB  ON  tableA.namefield = tableB.namefield ;
         AND tableA.datefield = tableB.datefield
    INTO cursor crsTemp 

   SELECT mytable
   append from ( dbf('crsTemp') )
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform