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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I try this SQL statement on

Status
Not open for further replies.

murphyc

Programmer
Sep 6, 2002
25
HK
Hi,

I try this SQL statement on VFP command windows.

UPDATE INVOICE SET COST_STD = (SELECT STDCOST FROM PRODUCT WHERE INVOICE.PRODUCTID = PRODUCT.PRODUCTID)

VFP prompt this error message
[Function Name is missing).]

What's wrong on this statement? Please help!! [sadeyes]
 
murphyc

What's wrong on this statement?

It depends what you want to do. Normally the update sql requires a where clause if there is a condition attached to it. Take a look at the help file on UPDATE SQL.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
MurphyC,

Which version of VFP are you using? I believe the ability to set a value equal to the result of a SELECT is only supported in recent versions. I'm not completely sure about that ... perhaps someone else can confirm.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top