I am having trouble getting an INSERT statement to work correctly. I most likely have the statement written wrong so if someone could please help me.1st: The asp page gathers an employees pin number2nd: It then gathers a list of documents (WI) to copy into their records from another source. This list is put into a string.What I want to happen is, take that employee PIN and add all the documents (WI) that are listed in that string variable. So when I look at that table, there will be one entry for each WI.Here is the asp/sql statment I have:Dim strSQL, copyEMPWIstrSQL = "INSERT INTO iso_employwi (pin, wi, date_added) SELECT '" & EmpCopy & "', wi, GETDATE() FROM iso_employwi " &_"WHERE (wi IN (" & strWiList & "))"When the asp page is run in debug mode, it shows the sql statement as:INSERT INTO iso_employwi (pin, wi, date_added) SELECT '170', wi, GETDATE() FROM iso_employwi WHERE (wi IN (WI8-5-003, Z05041452, Z05065054))
When the asp page is now actually ran to execute, it gives this error:Error Type:Microsoft OLE DB Provider for SQL Server (0x80040E14)Invalid column name 'Z05065054'.If things worked correctly, I would expect the table result to look like this:PIN | WI | Date_Added170 |WI8-5-003 | <sql date>170 | Z05041452 | <sql date>170 | Z05065054 | <sql date>Anyone have any ideas on how I can fix my sql statement to correct this error? Hope my explanation makes sense.JLM