>* Create SP string with: >* 1. Table variable. > >lcSQL = "declare @csrAPItem table (fpokey Char (12) NOT NULL) " > >* 2. Insertion of a value into table variable >lcSQL = lcSQL + "INSERT INTO @csrAPItem (fpokey) VALUES ('706652 11 0') " > >* 3. Join with main table >lcSQL = lcSQL + "SELECT a.* from apitem a inner join @csrAPItem b ON a.fPOKey = b.fPOKey" > >lnResult = SQLEXEC (lnHandle, lcSQL, "csrAPItems") >>