I’m fairly new to SQL, and MSSQL in particular. I’m looking for a way to select certain rows from an ODBC data source I have already set up into a table. Something along the lines of:
SELECT
<somecolumns>
INTO
<target_table>
FROM
[ODBC_data_source].sourcetable
I should also mention that the data source is properly configured, and I can import from it with the Import Wizard. Is what I have above possible, or do I need to look for other solutions?
Are you going to be accessing this data source a lot? If so, you might want to look into using a linked server: http://msdn.microsoft.com/en-us/library/ms188279.aspx
If it’s just a one time or very infrequent thing then you can use OPENROWSET assuming the ODBC exists on the server itself: http://msdn.microsoft.com/en-us/library/aa276850(v=sql.80).aspx