|
uh zip zoom posted:I'm trying to use Microsoft Excel to build a script to insert spreadsheet data (and not the headers) into an MS SQL database, unfortunately I don't know jack about (read: forgot the first time I was told) the syntax involved with creating a string with Excel. Help? There's an import utility for SQL 2005 that you can have generate the SQL syntax. It includes the ability to skip column headers and has a GUI for things like mapping columns. You could easily make it a SQL Agent job as long as your excel file is in a predictable place with a predictable name. Alternatively, you could make a stored procedure that takes the file name/location as a parameter.
|
# ¿ Nov 27, 2007 07:08 |
|
|
# ¿ Apr 29, 2024 02:57 |
|
Victor posted:I might make a thread about sweet SQL2005 features at some point, but I just wanted to get this out there: using cross apply/outer apply allows you to join a table-valued function to a table, using values from the table as input to the UDF. That's useful for, among other things, normalizing data with a CLR Regex Split function. I learned about this tonight, after getting pissed that there was no way to link a table-valued UDF to a table, since relations can't refer to each other outside of the join condition. SQL2005 to the rescue! Can you elaborate on this or maybe give an example? I work with SQL 2005 a lot and I have no clue what you're talking about.
|
# ¿ Nov 27, 2007 07:17 |