Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9238617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:48:12+00:00 2026-06-18T07:48:12+00:00

Overview I am trying to write a select statement in Visual Fox Pro 9

  • 0

Overview

I am trying to write a select statement in Visual Fox Pro 9 (VFP9) to update a row (and eventually several other records, I wrote a select statement first and it worked great, I got the expected result.

But I’m a little new to VFP9 syntax, and who wouldn’t be in 2013? I’m expecting the UPDATE which contains my select to operate a bit like an UPDATE INNER JOIN in actual non-foxprose SQL.

My select statement, it works fine.

SELECT temptable3.constate FROM temptable3, prw22001 ;
  WHERE prw22001.empno = temptable3.empno AND temptable3.pssn = prw22001.ssn AND temptable3.empno='5202' AND temptable3.constate <> prw22001.stateid AND prw22001.procyear='2012'

My Update statement (which contains my select statement and doesn’t work):

UPDATE prw22001 ;
  SET prw22001.stateid = SELECT temptable3.constate FROM temptable3, prw22001 ;
  WHERE prw22001.empno = temptable3.empno AND temptable3.pssn = prw22001.ssn AND temptable3.empno='5202' AND temptable3.constate <> prw22001.stateid AND prw22001.procyear='2012'

I get an error that reads Microsoft Visual FoxPro Command contains unrecognized phrase/keyword. I don’t see what it is talking about and a good 4/5ths of my query is my original select statement.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:48:14+00:00Added an answer on June 18, 2026 at 7:48 am

    convert your statement like this:

    UPDATE prw22001 ;
      SET prw22001.stateid = temptable3.constate ;
      FROM temptable3, prw22001 ;
      WHERE prw22001.empno = temptable3.empno AND temptable3.pssn = prw22001.ssn AND temptable3.empno='5202' AND temptable3.constate <> prw22001.stateid AND prw22001.procyear='2012'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Overview: Trying to write a trigger for a SQL Server 2008 database. TableA and
Overview I'm trying to build a graphic in my game by combining a few
Overview I am trying to get a photo feed on to my site using
Hi guys I'm a jquery noobie, just started jqueryUI Problem OverView: I'm trying to
I am trying to get an overview about the hourly frequency of my data
Just before I begin heres a small overview of what I'm trying to achieve
I have been trying to write my first user script for Google Chrome. It
Overview: I'm trying to design an application that will encrypt files to safely send
As a quick overview: I'm trying to make a game of pool using Box2D
While trying to make an overview of added friends, the following code only returns

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.