Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make a filename the variable

Status
Not open for further replies.

welshone

Programmer
Joined
Jul 30, 2001
Messages
414
Location
GB
Hello,
I hope somebody can help me.
What I have is a table which stores a .txt filename.

at present I
1) check that the file doesn't already exist
2) if it does exist delete the file in the table
3) manually type the .txt name into the table.


Is there a way I can automate this using DTS ?

thank you in advance





 
I spose you could have it run two SQL's..

DELETE FROM TABLE WHERE filename = 'blah.txt'
INSERT INTO TABLE (..) VALUES (.. , 'blah.txt')

Could you describe in more detail what you want to do?

You aren't talking about having the filename as an actual FIELD name are you?
 
yes, I'm talking about having an entry equal to the filename.

so my files are in the location
c:\files
what I want to do is check that location first for files.
if a file exists then check that it doesn't already exsist in the database.
if it does delete it from the database, then insert the filename into the database.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top