Viewing 15 posts - 1 through 15 (of 82 total)
Check the following article by Merrill
http://www.sql-server-performance.com/ma_finding_duplicate_indexes.asp
November 2, 2006 at 12:11 pm
Could you check the data types of customerID coulmn in both the tables.
September 21, 2006 at 12:12 pm
If the owner is 'dbo', your statement should work otherwise include (replace .. with .<>.) the schema name
September 21, 2006 at 11:58 am
Fetch all indexes using this script
SELECT
t.[name],
i.[name] as IndexName
FROM
SYS.INDEXES AS i WITH (NOLOCK)
INNER JOIN
SYS.TABLES AS t WITH (NOLOCK)
ON
i.[object_id] = t.[object_id]
INNER JOIN
SYS.INDEX_COLUMNS AS ic WITH (NOLOCK)
ON
i.[object_id] =...
September 8, 2006 at 10:08 am
declare @t table (
item varchar(40)
)
insert into @t values ('foo')
insert into @t values ('foo')
insert into @t values ('foo')
insert into @t values ('foox')
insert into @t values ('foox')
insert into @t values ('fooy')
insert into...
September 5, 2006 at 4:31 pm
update Customer
set address = LEFT (address, LEN(address) - CHARINDEX(',', REVERSE(address)))
August 31, 2006 at 2:21 pm
Your Drop statement should be dynamic... EXEC ('Drop Procedure '+ @spname)
August 24, 2006 at 12:30 pm
If you are using SQL 2005 and explore PIVOT operator
August 24, 2006 at 10:48 am
will wait untill execution of the called sp is completes.
August 24, 2006 at 10:44 am
declare @Table1 table
(
IDint,
Numberint,
DTvarchar(10),
[Name]varchar(10))
insert into @table1 values (1, 1, NULL, 'a')
insert into @table1 values (2, 1, NULL, 'b')
insert into @table1 values (3, 2, NULL, 'c')
insert into @table1 values (4,...
August 24, 2006 at 10:42 am
declare @t table (srno int)
insert into @t values (100001)
insert into @t values (100001)
insert into @t values (540053)
insert into @t values (550008)
insert into @t values (550008)
insert into @t values (550008)
insert into...
August 21, 2006 at 10:12 am
alter Procedure testLoad
(
@FileName varchar(50),
@Logon varchar(20),
)
As
SET NOCOUNT ON
DECLARE @File_Exists int,
@textfile char(150), --> Should be varchar
@BusArea char(2),
@PayId char(3),
@login varchar(20),
@CycleNo char(15),
@FHBusArea char(2),
@FHPayId char(3),
@FHCycleNo char(15),
@TrBatchPoNo char(10),
@rename varchar(255),
--@file_extn datetime -- Should be varchar
@file_extn...
August 11, 2006 at 9:41 am
Use single select SELECT @BusArea, @PayId,@CycleNo instead of three select statements
August 10, 2006 at 12:21 pm
Viewing 15 posts - 1 through 15 (of 82 total)