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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 file problem

Author  Topic 

pmccann1
Posting Yak Master

107 Posts

Posted - 2006-09-12 : 10:25:35
i need some advice i am importing a text file into sql from a folder. the file is created each week and is given a sunday date however there is about 100 files in this folder. My query is run on a monday so i need the query to find the date of the monday -1 and find the file in the folder that it matches. Does this make sense

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-12 : 10:29:34
Is this a sequel to this http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=71821 ?

SELECT GETDATE() Today,
DATEADD(day, DATEDIFF(day, 1, GETDATE()), 0) Yesterday,
'logview_' + CONVERT(varchar, DATEADD(day, DATEDIFF(day, 1, GETDATE()), 0), 12) + '.csv' FileName

Peter Larsson
Helsingborg, Sweden
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-09-12 : 10:38:21
How about

http://weblogs.sqlteam.com/brettk/archive/2005/06/30/6907.aspx


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page
   

- Advertisement -