Viewing 15 posts - 5,986 through 6,000 (of 26,490 total)
One thing looking at the snippets, it isn't always an issue but I have had problems with UPDATE statements like this:
update #MyTempTable set
somecol = somevalue --...
August 28, 2014 at 4:25 pm
Still not sure what is going on, but it is possible indexes on the temp table would help. Without seeing the actual code, though, it is hard to say.
Oh,...
August 28, 2014 at 3:47 pm
thomashohner (8/28/2014)
I inherited a Stored Procedure that has a temp table #results that is updated 65 times throughout the SP . This SP is used for a reporting only....
August 28, 2014 at 3:24 pm
I really must be getting jaded. I get chastised for not being able to figure out what some ones uncommented and convoluted code on a blog does, and then...
August 28, 2014 at 7:57 am
ChrisM@Work (8/28/2014)
Welsh Corgi (8/28/2014)
ChrisM@Work (8/28/2014)
Welsh Corgi (8/28/2014)
Any ideas...
August 28, 2014 at 7:51 am
Jeff Moden (8/27/2014)
Eirikur Eiriksson (8/27/2014)
keshabsingh (8/27/2014)
This is not homework session. Your approach is very limited with hard coding the values. What if data is like this?
Then, that in itself is...
August 27, 2014 at 9:36 pm
This is not an error. The * indicates that the value is too large for the currently defined size of the variable.
August 27, 2014 at 1:56 pm
Eirikur Eiriksson (8/27/2014)
keshabsingh (8/27/2014)
Thanks Eirikur Eiriksson!.Your attempt is not bad. 😛The approaches other users presented are more robust and accurate. Thanks anyway.
I guess that now it's your turn to make...
August 27, 2014 at 12:41 pm
rxm119528 (8/27/2014)
keshabsingh (8/27/2014)
Hints: you need to join the same table multiple times.
with CTE(rn,steps)
As
(
select row_number() over ( order by steps),steps from #table1)
select t1.steps,t2.steps from CTE t1
left outer join CTE t2
on t1.rn...
August 27, 2014 at 12:03 pm
Why did people post code? It would have been nice to see what the OP had tried first since this looks like homework even though the OP denies it.
August 27, 2014 at 11:08 am
keshabsingh (8/27/2014)
create table #table1(steps int)
insert into #table1(steps)values(1)
insert into #table1(steps)values(3)
insert into #table1(steps)values(4)
insert into #table1(steps)values(5)
select steps from #table1
drop table #table1
You will get this
steps
1
3
4
5
I want this way.
stepFrom stepTo
1...
August 27, 2014 at 9:56 am
Anyone else feel uncomfortable answering this question?
August 27, 2014 at 9:53 am
stadmanwi (8/25/2014)
Run a sql agent, set the task to powershell. I believe you need to be admin on box, etc... So not...
August 26, 2014 at 8:47 am
Evil Kraig F (8/25/2014)
TomThomson (8/22/2014)
Haven't noticed him recently on SQLServerCentral, though :cool:.
Oh, he's been around a while. He stopped at one point. I'd hoped they'd shut his...
August 25, 2014 at 3:58 pm
CELKO (8/25/2014)
Quit making excuses for not being professional.
I agree, try being a professional and stop bashing people over the proverbial head. Instead, try being an actual mentor to...
August 25, 2014 at 3:57 pm
Viewing 15 posts - 5,986 through 6,000 (of 26,490 total)