Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update SQL in Foxpro

Status
Not open for further replies.

BRADLEY21

Programmer
Sep 19, 2002
35
US
This does not work in foxpro, for those who know what I am trying to do, your help would be appreciated.

UPDATE table_1;
SET field_1= (SELECT field_1;
FROM table_2;
WHERE table_2.key=table_1.key)

Thanks

 
according to the help file the set field = expects an expression. select SQL is not an expression that can be evaluated, it is a command. Attitude is Everything
 
SELECT field_1;
FROM table_2;
WHERE table_2.key=table_1.key INTO CURSOR junk

UPDATE table_1 SET field_1= junk.field_1 Attitude is Everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top