I need help on how to import a Flat file source into SQL database, but the name of the file (part of the name) changes everyday. How can I create a method to import the file everyday into a new table without automatically ?
							
						
					Flat file source import to SQL databse
				
					Collapse
				
			
		
	X
- 
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
Try this:
[PHP]DECLARE @FilePath varchar(50), @SQL varchar(8000)
select @FilePath = '\\servernamehe re\ftproot$\TES T'
SELECT @SQL = 'SELECT *
FROM OpenDataSource( ''Microsoft.Jet .OLEDB.4.0'',
''Data Source="' + @FilePath + '";Extended properties=Text '')...TEST#txt'
execute(@SQL)[/PHP]
It works on one of my servers and not on another.
TEST#txt is file name. You can change it. 
Comment