By using listi.net you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes
   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,'54.165.57.161')

listi.net

 


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.
blog comments powered by Disqus
   
Home | About | Feedback| Privacy | Terms of Service | @alecberg | FAQ | | Copyright © 2021 All Rights Reserved. Edit
This site uses cookies. If you don't want cookies and who doesn't want them as they're yummy, then leave.