[dba-SQLServer] Open a text file from SQL Server

Francis Harvey HARVEYF1 at WESTAT.com
Thu Oct 7 10:18:48 CDT 2004


Arthur,

Perhaps bcp with an appropriate format file into a temporary table
which can then be loaded into a variable? I actually did this for a
binary file with a temporary table that had an image field, but I
could work out a text example if it would be of interest.

Francis R Harvey III
WB 303, (301)294-3952
harveyf1 at westat.com

> -----Original Message-----
> From: dba-sqlserver-bounces at databaseadvisors.com 
> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf 
> Of Arthur Fuller
> Sent: Tuesday, October 05, 2004 5:01 PM
> To: dba-sqlserver at databaseadvisors.com
> Subject: [dba-SQLServer] Open a text file from SQL Server
> 
> 
> Can someone tell me how to open a text file from SQL Server? 
> And place 
> its contents into a memory variable? I'm looking at OPENXML 
> but all its 
> examples use text that is assigned to a variable from within the 
> example, rather than read in from an XML or just a text file. 
> It looks 
> like full text search will do it, but that's a lot of install 
> overhead 
> just to read in a file. Is there a simpler way?
> 
> TIA,
> Arthur
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 



More information about the dba-SQLServer mailing list