I have a select statement to pull PICKSL, SLOT, PROD, DESC, PACK, MANU ID, HITIX, and PALLET QTY from the (PICKSL) table. The present nested select statement grabs all the records whose product numbers are NOT already in the ALTER table.

PROBLEM: I would like to pull the SLOT field from the TEST table since the PICKSL table does not have a SLOT field. Is there a way to do this in SQL? Thank you very much in advance.

VB Code:
  1. sql = "INSERT INTO MAIN ( PICKSL, SLOT, PROD, [DESC], PACK, " & _
  2.           "[MANU ID], HITIX, [PALLET QTY] ) " & _
  3.           "SELECT p.PICKSL, p.PICKSL, p.PROD, p.DESC, p.PACK, " & _
  4.           "p.MANUID, p.HITI, p.OH " & _
  5.           "FROM PICKSL AS p " & _
  6.           "WHERE Not Exists ( " & _
  7.             "SELECT * " & _
  8.             "FROM [ALTER] a " & _
  9.             "WHERE  a.PROD = p.PROD);"