Viewing 15 posts - 136 through 150 (of 169 total)
most of the time is spent clustered index update (98%)
If you want to make the updates work fast ..
delete the clustered index . run the update query then create clustered index on...
August 28, 2006 at 4:18 pm
Explain the problem clearly.. I dont think its pivoting a table.. if that is the case I saw so many solutions in this forum only
August 28, 2006 at 4:05 pm
I think Query is perfect ( I assume passwd as char type and ident as integer)
Tested with the same scenario explained by you, my machine is taking less than minute to...
August 28, 2006 at 3:29 pm
Replace the following statement in the function
Added space to every title
SET @STR_INIT =LTRIM(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(@STR,'Mrs ',''),'Mr ',''),'Dr ',''),'Rev ',''),'Ms ',''))
This will guarantee you, if any person have the name with the title...
August 28, 2006 at 1:52 pm
try this
CREATE FUNCTION dbo.Initials
(
@STR VARCHAR(4000)
)
RETURNS VARCHAR(4000) AS
BEGIN
DECLARE
@STR_INIT VARCHAR(4000),
@STR_PROCESS VARCHAR(4000),
@STR_COMPLETE VARCHAR(4000),
@I INT,
@j-2 INT
SET @STR_INIT =LTRIM(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(@STR,'Mrs',''),'Mr',''),'Dr',''),'Rev',''),'Ms',''))
SET @I=DATALENGTH(@STR_INIT)
SET @j-2=0
SET @STR_COMPLETE=''
WHILE @j-2<@I
BEGIN
SET @STR_PROCESS= SUBSTRING(@STR_INIT,@J,1)
IF (ASCII(@STR_PROCESS)>64 AND ASCII(@STR_PROCESS)<92)
BEGIN
SET @STR_COMPLETE= @STR_COMPLETE+@STR_PROCESS
END
SET @j-2=@J+1
END
RETURN (@STR_COMPLETE)
END
----------------------------------------------
If...
August 28, 2006 at 1:43 pm
select distinct a.name from sysobjects a inner join syscolumns b on a.id=b.id and b.iscomputed=1
where a.xtype='U'
The above query will give the table names which contains atlease one computed column
August 25, 2006 at 2:54 pm
You can try this
create table Numbers (num1 int,num2 int)
insert into Numbers values(1,2)
insert into Numbers values(3,4)
insert into Numbers values(5,6)
declare @temp int
Update Numbers
set @temp=Num1, Num1=Num2, Num2=@temp
August 25, 2006 at 10:41 am
try this
t.ColVarchar + ' ' + convert(varchar,t.ColText)
August 25, 2006 at 10:30 am
I think there is no need for a function for this, just get the result into @ImageNo using below select statement and use the variable in insert
select
...
August 24, 2006 at 2:59 pm
I think James needs to know the last modified date of a stored procedure
This can be get from INFORMATION_SCHEMA views in SQL Server 2005
"Date the object was last modified by...
August 24, 2006 at 10:51 am
Jeff, you are right.. my method will work for for single characters only
Thanks
August 24, 2006 at 10:47 am
You can try this also
select
name,modify_date from sys.objects
August 23, 2006 at 5:26 pm
Sergiy: Your solution is fetching the 'XX' Value also
The following will fetch only numerics
DECLARE C_TESTE INSENSITIVE CURSOR
FOR
SELECT TESTE FROM TESTE...
August 23, 2006 at 5:15 pm
Viewing 15 posts - 136 through 150 (of 169 total)