dbr983 : -2147217900 The INSERT INTO statement contains the following unknown field name: 'dt_accessed'. Make sure you have typed the name correctly, and try the operation again.insert into listaccess (dt_accessed,list_id,userid,ip_addr) values ('11/30/2021 11:17:25 AM',33447,-1,'126.96.36.199')
Creating SQL statements using Excel
Today I received a list of data from a colleague in an Excel spreadsheet. I needed to take this information and retrieve other information from a database.
On the spreadsheet data is in column A. In column B put the following:
="insert into #tmp value ('"&A1&"')"
Then fill down the data
in your SQL app
Create table #tmp ( f1 varchar(20) )
copy and paste the SQL statements and run. You now have a temp table that can be used to extract other information from your database.