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

Visual Fox Pro 9

Status
Not open for further replies.

timjhan

Programmer
May 25, 2015
1
PH
Plz help me with this one im new.
i want to insert values in my table using the values in other table but it doesn't work.
heres my code
qryinssub = "INSERT INTO section_load(sec_id,subj_id)VALUES('sec01',(";
+ "SELECT subj_id FROM subjects WHERE level_id = lvl01))"
SQLEXEC(gnhandler,qryinssub)
plz HELP.
 
Do a Debug.Print qryinssub, and determines if that string works in a query.
 
What about this ?
qryinssub = "INSERT INTO section_load(sec_id,subj_id) SELECT 'sec01',subj_id FROM subjects WHERE level_id='lvl01'"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top