Viewing 15 posts - 16 through 30 (of 267 total)
Hi,
You could bcp out the data, then bcp/BULK INSERT it back in again.
January 3, 2005 at 2:41 am
The pleasure was on my side, Mr Yoda.
December 13, 2004 at 5:07 pm
Very nice anyway,
and sharp of you to spot this way getting all the possible groups / permutations.
The code is extremely fast as well, good job
December 13, 2004 at 1:54 pm
"select N.N as GroupID, V.ID
from @Numbers N
inner join @Vals V
on (power(2,V.ID-1) & N.N) = power(2,V.ID-1)
order by N.N, V.ID"
Very impressive Yoda!
Is this a "known" algorithm, or did you work it out...
December 13, 2004 at 12:50 pm
This is hardcoded for up to 4 ID's ( but it would not be too hard to generate the dynamics )
Good Luck.
/************************************************************************************/
-- setup
set nocount on
create table #t([ID] int identity, [Desc]...
December 10, 2004 at 5:40 pm
ok do:
select *
from msglog
where datediff(day,msglog_crtdt,floor(cast(getdate()-1 as float))) = 0
for previous day ( i.e. day before getdate() )
/rockmoose
December 10, 2004 at 4:50 pm
Try:
select tbl.*
from
tbl join
(select [ID],[DATE],max([TIME]) as [TIME] from tbl
where [TIME] < '18991230 10:00:00.000'
group by [ID],[DATE] ) as closest_to_ten
on tbl.[ID] = closest_to_ten.[ID]
and tbl.[DATE] = closest_to_ten.[DATE]
and tbl.[TIME] = closest_to_ten.[TIME]
/rockmoose
December 10, 2004 at 3:36 pm
To get all the transactions for 2004-12-10,
You could do this:
select *
from msglog
where datediff(day,msglog_crtdt,'20041210') = 0
/rockmoose
December 10, 2004 at 3:26 pm
Hi,
Try this in QA, and see if you get any wiser..
create table #t(hhhh_mm nvarchar(20))
insert #t(hhhh_mm) select N'211:34' union select N'11:34' union select N'1:34'
select hhhh_mm, left(hhhh_mm,charindex(N':',hhhh_mm)-1) * 60 + right(hhhh_mm,2) as...
October 25, 2004 at 3:01 am
Yes, very quiet on this topic for a while...
/rockmoose
October 11, 2004 at 3:59 am
Whoa, nice script Harry.
SQLDMO also has scripting capabilities, but I guess you knew that.
September 1, 2004 at 7:31 am
Ok, No Idea.
Don't see why SET ROWCOUNT would make it much slower compared to TOP.
You could try to hint:
OPTION( FAST 200 ) in the select , see if it makes...
August 31, 2004 at 5:52 pm
You're welcome,
Well next time you will remember to alias your derived table 🙂
/rockmoose
August 31, 2004 at 4:33 pm
If the ROWCOUNT xxx is outside the dynamic sql...
Put it inside the dynamic Sql.
You would gain performance by avoiding Dynamic Sql if possible.
/rockmoose
August 31, 2004 at 4:30 pm
If you have selected a database in EM ( or level below database )
You have the GenerateSqlScript in the tools menu.
/rockmoose
August 31, 2004 at 4:25 pm
Viewing 15 posts - 16 through 30 (of 267 total)