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

The multi-part identifier "wash.nParaID" could not be bound

Status
Not open for further replies.

Niki_S

Programmer
Jun 4, 2021
232
LK
My foxpro9 table name : C:\TEMPFILES\wash_factory
My sql server table name : MIS.dbo.wshPara

sql table MIS.dbo.wshPara,
Code:
nParaID     nParaNo      nParaYear     nParaCD
219         1            2021          vtmc

foxpro9 table C:\TEMPFILES\wash_factory,
Code:
nParaID     nParaNo      nParaYear     nParaCD
219         2            2021          vtmc

I used below code in foxpro9 ,
Code:
stra="Update MIS.dbo.wshPara Set cParaNo= t2.cParaNo,cParaYear=t2.cParaYear,cParaCD=t2.cParaCD From MIS.dbo.wshPara t1 Inner Join wash_factory as t2 On t1 .nParaID= t2.nParaID"
SQLEXEC(hndOps,stra)

After run my foxpro form I got this below error,

Capture_cbsnfw.gif



I want to get wash table as below,

SQL table MIS.dbo.wshPara,
Code:
nParaID     nParaNo      nParaYear     nParaCD
219         2            2021          vtmc

How can I fix this error.
 
Well, your updates give tables alias names t1 and t2. Then you have to adress them by t1 and t2, not by their original name

AS you seem to learn the basics not only in VFP but also SQL Server, take out VFP and test your code in SSMS (SQL Server Management Studio).

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top