Do something like this.  I can't really make sense of your variables and what 
you're trying to achieve, but this is a start:

       INSERT INTO bd_details ( pon, custnum2)  SELECT  pon, custnum2 FROM 
master WHERE billstat like 'cv%' and pon = .vpon_entry



> I am trying to insert data into a table based on a response (vpon_entry) 
> into a dialog box upon entry into a form.
> 
> Not sure of how to design a insert command.
> 
> set var vpon_entry text
> set var vcust_nub2 text
> 
> Dialog box entry
> 
> -- vpon_entry = b109562
> 
> vcustnub2 = sel custnub2 from master where pon =  vpon_entry 
> 
> -- note: trying to insert this data into bd_details based on the fact that a 
> match with pon in master and where billstat in master = cv.
> 
> -- The column names in bd_details are pon and custnub2
> 
> insert vpon_entry  vcust_nub2  into bd_details where vpon_entry = (sel pon 
> from master where +
> billstat like 'cv')  
> 
   

Reply via email to