Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 select from table on basis of external table

Author  Topic 

mmensink
Starting Member

2 Posts

Posted - 2011-07-29 : 02:59:48
Hi all,

I have reading access to a SQL server 2008 database. I need to extract data from a table, whith selection criteria based on data from a csv-file on my harddisk. I understand how to use inner joins to match to tables, but the problem here is that one table resides inside the memory of the server, whereas the reference table sits on my harddisk (laptop). Does anyone have an idea how to link those physically separated tables?

Many thanks in advance!

Maarten

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-29 : 04:36:04
are both of tables in sql server itself? are laptop and server in same domain?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

mmensink
Starting Member

2 Posts

Posted - 2011-07-29 : 07:15:13
Hi visakh16,

Thank you for your reply. No, only one table resides in SQL server, the other is a CSV-file on my harddisk. I can VPN into the domain, so that shouldn't pose any problems.
Go to Top of Page

derach2000
Starting Member

37 Posts

Posted - 2011-07-29 : 09:21:01
Hi,

I suppose you could try using the OPENROWSET command
to import the data to #temp table
and perform you query

check this http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/5869d247-f0a0-4224-80b3-ff2e414be402

Kind regards
Armin
Go to Top of Page
   

- Advertisement -