Exactly, I modified it slightly to evaluate the DateLastModified instead of the DateCreated. One other thing I was considering was to try to pass in a text file containing a list of folders (with their full path) rather than just hardcode in the constant as above. I guess this would involve...
I have a series of folders that are backed up every night using xcopy. I want to be able to run a script to report the newest filename and DateLastModified of the files in each of a number of folders. I have found an example of a script that shows me the newest file and its date/timestamp but I...
If you need to modify the scheduled job you then need to go into the Enterprise Manager, locate the instance and then Management, SQL Server Agent (needs to be running!), then Jobs and you will see the job that you scheduled earlier. You can modify (or delete) it by right-clicking and selecting...
That works where the value of isdate returns as 1, but I get the same error as before when I change the return value to 0, becuase the second bit of code produced an error:
Server: Msg 174, Level 15, State 1, Line 3
The isdate function requires 1 arguments.
It's actually what I need as in some...
Hi Mike,
I'm still getting the same error:
Server: Msg 241, Level 16, State 1, Line 1
Syntax error converting datetime from character string.
when doing the CAST either way. The source data type is char(6). Any ideas?
Thanks,
Mickey
Sorry Mike,
You are right - I had actually changed it to 2,1 in Query Analyser - I had just pasted an earlier version of it into my posting. Having re-run it it still gives me the same issue. The query parses fine but then gives the syntax error when I run it.
Thanks for your perseverance!
Mickey
Hi,
I am importing (using DTS) dates from an ODBC data source which come across as char (6) in the format A21125 for 25th November, 2002. What is the best way to get convert this data type into a meaningful date in SQL Server 2000? I tried doing a string operation as follows:
select...
Hi,
I'm importing data from ODBC compliant datasource to SQL Server 2000 using DTS Wizard. Works fine except I don't know how to get it to update changes only to the DB. I would like to schedule a package to run nightly to extract the updates from the legacy database without bringing the whole...
Thanks Silvers5,
I have adjusted the code as recommended and it works fine this way too. I have not experienced a crash since I posted the error, however I will keep an eye on things! On further reflection I was just wondering if this error could have anything to do with the provider - I use...
Hi,
I'm getting the error below intermittently. The trouble is this script works fine for a period of time but then crashes out. I'm using my W2K Professional as the IIS 5.0 server. If I reboot it will work again for a while. I have a number of other Form/Response scripts that yield the same...
Hi Oomingmak,
I think you may be able to send some keystrokes to the active window by using the SENDKEYS command as below. I got this script from somewhere so apologies to its author for undue recognition :) I'm also a newbie but find this forum and the likes of...
Hi, Is it possible to use VBScript to automatically configure ODBC to add User/File DSN's. Should one fire up the application like this:<br><br>Set shell = CreateObject("Wscript.Shell")<br>shell.run "odbcad32.exe"<br><br>and then somehow Add new User/File DSN's or am I on the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.