I wish to create a log when scheduled procedures are run to capture some counts and totals. I want to insert a record into a log file each time the procedure is run. I wish to store the name of the stored procedure to this log file. What I am looking for is a way to determine from within the...
I have a SQL job which the first step executes a 'extract.bat' script. Within this script is a copy from another physical server as follows:
copy \\serverb\temp\xxx.txt e:\xxx.txt
It seems that it never finds the file to copy. I placed an "if exist echo nofile" in front of the copy and it...
I have a database with a table within it that I want to extract into a text file. On my laptop I have the database defined and have no problem with the following command. The difference is that on my laptop the database name is test and on the actual server it is a numeric name. I beleive...
Is there a performance or other advantage to using VARCHAR over the TEXT field definition?
I am converting from a FoxPro database which has a MEMO type field. It would be easy to say for any MEMO field in FoxPro to just define it as TEXT to SQL. In most cases the maximum characters used in...
I have a laptop which has Windows XP pro installed. I had SQL 2000 personal and Crystal Reports 7 applications installed. I was no longer using Crystal on the laptop and wanted to remove it. I did an uninstall and the uninstall had some problems but I did respond to leave the shared files...
Why does the following insert statement produce the error that follows the code.
INSERT INTO diary
(
di_user, di_type, di_task_dt, di_subject,
di_rem_fl, di_sta_cd, di_sta_dt, di_notes,
di_dest_pk, di_dest_fm
)
SELECT
froi.fr_efroi,
'A'...
I have a stored procedure which is failing on the following statement/error.
DELETE FROM provider
WHERE EXISTS (SELECT * FROM t8_work WHERE t8_provid = pvb_provid)
--------------
Server: Msg 446, Level 16, State 9, Line 54
Cannot resolve collation conflict for equal to operation.
Over the...
I have a number of stored procedures that work in my development environment and at many clients without any problem. I am trying to install the same procedures on a new server and it is requiring that I capitalize the table names in the SELECT/UPDATE/INSERT statements.
All servers are running...
I want to check for the existance of a text file, the file name being passed to a stored procedure. If the file exists inport it and archive it, if not do an early exit.
Do I just need to act on it as though it exists and catch the error or is there a cleaner way?
Thanx
Mark
I am having a problem supplying a file name to a bulk insert command. In the following I am trying to build the file name using a directory which may change between servers and the fixed file name.
DECLARE @updates_dir varchar (500), @provlist varchar(500)
SET @updates_dir = 'd:\updates\'
SET...
I have seen a number of DateTime controls referenced in this forum and was wondering if someone had a Time only control. I am about to embark on making one if someone does not have one or can steer me to a place with one.
What I am looking for is a control that will maintain a military time...
I have read a number of times in this forum about the use and expense of using a cursor in a stored procedure. With that in mind I was wondering how one might best accomplish the following without using a cursor.
Select all records from a table which have a status of open. If open and the due...
I need to do what seemed like a very simple thing. Run a SQL query, producing XML output and saving that output to a text file which will be input to an EDI package.
After looking around the best I have come up with thus far is the "sp_makewebtask" method as follows:
sp_makewebtask...
I have a local production server, and a web server at a remote ISP connected via a VPN. Both servers are running MS SQL 2000. I wish to do an extract of data on the production server and update it to the web server daily. The web server only gets a subset of the information on the production...
I have a process which weekly inserts a number of records into a SQL 2000 database. The file is provided to me as a text file with 200K records in it. I create a cursor from the updated text file and then in a scan loop I use a scatter, check to see if the record exists and either do a...
I have a problem where I insert a number of records into a table using an updateable view. Once I issue the tableupdate(.t.) I get an error stating that I have a non-unique candidate key. Following is the basic code.
---------------------------
<code>SELECT 0
USE parameterizedview...
I get multiple files daily that are in a flat file format with fields delimited with a @ and each record delimited with a CRLF. The first field is a file type identifier, the second field is a record type identifier. The first record in the file is a header record that contains the creator...
I have a remote view using MS SQL 2000 database and table. I use a framework and had a problem I was trying to solve regarding updates that did not back out correctly when an error was encountered. I wrote the following small program to test the transaction and subsequent backout when a failure...
I have an application which has been running in production for about a year. The user has just uncovered a situation which causes the application to bomb with error "1541 - Connection XXX is Busy". What does this mean and is there a connection parameter or ODBC parameter which may...
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.