Viewing 15 posts - 256 through 270 (of 291 total)
In addition to David's comments I like the style because it is easy to comment lines of code by adding the "--" comment at the beginning of a line. In...
May 10, 2007 at 12:45 pm
Use the DBCC SHRINKFILE statement and specify the EMPTYFILE clause:
USE UserDB
go
DBCC SHRINKFILE ('LogicalFileName',EMPTYFILE)
Then delete the file using
USE master
go
ALTER DATABASE [DatabaseName] REMOVE FILE [LogicalFileName]
go
Then recreate the file on the new...
May 10, 2007 at 10:29 am
If you don't care which 2000 get deleted you can use the following which will delete the first 2000 rows it finds:
set rowcount 2000
delete from tablename
set rowcount 0
More than likely...
May 10, 2007 at 9:56 am
I'm just guessing based on your code but change the script to look like this: (Please note my comments, marked with '***)
Function Main()
Dim cn '* As New ADODB Connection
Dim strConn
dim...
May 10, 2007 at 8:32 am
Ok, that is a little better. From your code, it appears that only A SINGLE record is being inserted into TEMP table. You then go and join that single record...
May 10, 2007 at 8:11 am
I think you have a serious problem here. The log files are tightly coupled to their data files. If you have a backup it would be best to restore from...
May 10, 2007 at 7:03 am
This is mighty convoluted process for a single statement being sent to the database:
strSql2=" Create TABLE #TempNavigation (intid int , intParentId int, txtCaption varchar (255) ,txtTitle varchar (255), intCompanyId int)"...
May 9, 2007 at 2:37 pm
A lot of variables involved with sending SMTP mail. First if they implemented the SP-Send_cdosysmail exactly as published on the Microsoft site (http://support.microsoft.com/kb/312839) then run the following:
select * from...
May 9, 2007 at 1:35 pm
That seems to be the story of my life, stuck with someone elses mess. But I figure the scales probably balance as I don't maintain ALL of my old work!
Good...
May 9, 2007 at 1:04 pm
Easiest solution is to drop the trigger on your "new production" or "destination" box and then recreate it after data movement complete.
James.
May 9, 2007 at 12:44 pm
Ok, I had a chance to look through your code and I see several problems:
1. Your instead of insert trigger will cause problems when more than one row is inserted...
May 9, 2007 at 11:57 am
Ok, I altered the "test_" table to contain an additional column which will hold the amount calculated for the agent, along with and extra column to hold the "low dollar...
May 9, 2007 at 10:47 am
--This should do the trick, add where clause as appropriate to limit the data retrieved from the book table
select b.id,
b.name,
BARCODE = coalesce((select [value] from alt_book_id where id =...
May 9, 2007 at 10:11 am
Not sure since I didn't test the theory but have you made sure that the output file "D:\Archive" can be created by the SQLServer account on the local SERVER drive...
May 9, 2007 at 9:27 am
Are you sure there is not an update trigger in there somewhere? Nothing posted accounts for the error message you got when updating the old record.
Additionally, how are you moving...
May 9, 2007 at 9:24 am
Viewing 15 posts - 256 through 270 (of 291 total)