Viewing 15 posts - 3,586 through 3,600 (of 5,103 total)
A couple of recomendations :
1. Sort on TSQL (it is good at it)
2. Write the algorithm in c (pointer arithmetic is blindly fast when compared with VB)
Just my $0.02
June 23, 2005 at 1:01 pm
this can come very handy when you need to join the outcome of two stored procedures, not that I recommend it but for something that runs not very often is...
June 23, 2005 at 12:51 pm
well, there is an ugly way but hey its a way:
select spid,dbname
from Openrowset('SQLOLEDB','Data Source =SERVERNAME;Trusted_connection=yes;Initial Catalog=master',
'exec sp_who')
![]()
June 23, 2005 at 12:42 pm
Like I tried to said you can create you custom logic like:
select *
from table
order by fn(fld)
but the best approach is to materialize that function at insert time and use that...
June 22, 2005 at 3:40 pm
can you check that
select @@servername
is the same as
select SERVERPROPERTY ( 'serverName')
if it returns null you need to
exec sp_dropserver 'old name'
sp_addserver
@server ='actualname' , @local = 'local'...
June 22, 2005 at 3:36 pm
put the sp call logic in a JOB
use sp_start_job (which run asynchronuously)
check stuff when job is finished
hth
June 22, 2005 at 3:11 pm
OR
SELECT mile_code,
AVG(CompAct *1.0)
FROM opvw_actPerMile
GROUP BY mile_code
ORDER BY mile_code
June 22, 2005 at 3:02 pm
actually, if you know what is the maximum no of digits and that the numbers are always present then
select *
from table
order by
right('0000' + parsename(replace(fld,'-','.') ,3),4) +
right('0000' + parsename(replace(fld,'-','.') ,2),4)...
June 22, 2005 at 2:57 pm
of course it is:
ex:
select *
from table
order by '0'+replace(fld, '-', ' 0')
June 22, 2005 at 2:47 pm
well, there are not many choices either ![]()
[Edit:] Something is not right, I am getting multiple post everytime ??
June 22, 2005 at 2:38 pm
I am glad I did because all I did was just a guess ![]()
June 22, 2005 at 2:33 pm
Sorry,
I never meant to be rude just that the post above was funny. I have been in your position before and is not pleasant.
Please, accept my apologies
June 22, 2005 at 2:29 pm
declare @cmd varchar(200) , @i bigint
set @i = 0
while 1 = 1
begin
set @cmd = 'create database db' +cast (@i as varchar(50))
exec (@cmd)
set @i = @i + 1
end
-- now practice...
June 22, 2005 at 2:26 pm
sp_renamedb is acceptable, you usually don't have that many DB at once to rename ![]()
June 22, 2005 at 2:09 pm
Viewing 15 posts - 3,586 through 3,600 (of 5,103 total)