Viewing 15 posts - 661 through 675 (of 7,429 total)
Lynn's should work, however this may be a little more simplified
DECLARE @strCompany varchar(50),
@returnNumber varchar(6)
UPDATE
dbo.mm_CompanyNo
SET
@returnNumber = last_cust_no = (CASE WHEN @strCompany = 'ABC' THEN '0' ELSE 'M' END) + RIGHT('00000'...
April 27, 2007 at 6:25 pm
I agree use NULL and not a fixed value. You can work with it in your app just the same. However, what determines the validity of the data as this...
April 27, 2007 at 6:12 pm
Sorry I may be confused. However you are saying you need to replicate 200 dbs down to a single db on your reporting server right?
You can setup a single distributor...
April 27, 2007 at 6:05 pm
Most likely not but check to see mdf becomes available during the recovery. If so copy it to another location (might not let you since may be locked). However if you...
April 27, 2007 at 6:56 am
It is only limited by available memory on the server. From your message it looks like you have a character string which when it tries to copy the value in...
April 27, 2007 at 6:37 am
Do you have the original mdf file at all not the one in the backup? And do you keep multiple backups?
April 25, 2007 at 2:04 pm
Which version of SQL and what are the tables definition but you can always use option for SQL 7.
April 25, 2007 at 1:45 pm
OK that would make sense. With replication you will either need to kick off and complete before you can do this or setup a job to do the work shortly...
April 25, 2007 at 12:41 pm
When they are copied do they get changed to the same name? If so the filesystem could have had the file locked. Have had this happen before using excel this...
April 25, 2007 at 12:31 pm
I would start with the log file first and do
BACKUP LOG dbName
WITH TRUNCATE_ONLY
then shrink just the log file first, could be the log file is filling when you try to...
April 25, 2007 at 12:23 pm
This does work but you shoudl for the sake of reference do this
select dateadd(dd, datediff(dd, 0, getdate()), 0)
Doing this will show you why
select dateadd(yyyy, 0, datediff(yyyy, 0, getdate()))
versus
select dateadd(yyyy, datediff(yyyy,...
April 25, 2007 at 12:07 pm
May or may not make any difference but nesting joins for related objects can sometimes improve performance. But it might be an idexing or other issue. I would look at...
April 25, 2007 at 11:53 am
This is a little longer but overall the performance should be better than David's the larger the dataset is you are working with.
The reason is that in Davids example...
April 25, 2007 at 11:47 am
If these are on the same server
For SQL 2000 you don't have those options but this can help
SELECT
A.KeyColumn,
B.KeyColumn
FROM
(select KeyColumn, CHECKSUM(*) CheckMe from dbName1.dbo.Table1) A
FULL JOIN
(select KeyColumn, CHECKSUM(*) CheckMe from dbName2.dbo.Table2)...
April 25, 2007 at 11:26 am
Are you saying before you reinstalled you were at SP4? If so you need to actually restore the SQL Server and patch to SP4 first then resotre Master and your...
April 25, 2007 at 10:03 am
Viewing 15 posts - 661 through 675 (of 7,429 total)