Viewing 15 posts - 12,316 through 12,330 (of 15,381 total)
Robin Sasson (4/20/2012)
Replacing characters can be easily done with the REPLACE function available in SQL Server 2005 onwards.http://msdn.microsoft.com/en-us/library/ms186862(v=sql.90).aspx
Actually REPLACE has been around a lot longer than 2005. BOL does not...
April 20, 2012 at 7:26 am
GilaMonster (4/19/2012)
Just walk away. He's not likely to get it and all you're doing is getting frustrated. Walk away and leave him.
Maybe if we rough him up a little bit...
April 19, 2012 at 2:36 pm
Mike01 (4/19/2012)
At least he's consistent. This is just as bad as his other post. 😀
LOL!!!!
April 19, 2012 at 2:07 pm
riya_dave (4/19/2012)
they are null in temp1
What???? Do you mean there are columns in temp1 for the variables you are checking for null???
April 19, 2012 at 1:58 pm
do you know what an if statement is? Remove them. They are not needed.
April 19, 2012 at 1:56 pm
riya_dave (4/19/2012)
i ma getting values in all three variables from temp1
Yes they get set the first pass through, then they are not null so none of your code will execute...
April 19, 2012 at 1:54 pm
Because your "if" conditions don't make any sense. You declare them outside the cursor (this is good). Then you set all 3 of them the first trip through your cursor....
April 19, 2012 at 1:42 pm
riya_dave (4/19/2012)
thats what i did right now,i removed variavel i declare inside cursor,sill not workingmy question can understand by whatever i have posted
What you posted is partial code. It is...
April 19, 2012 at 1:20 pm
--HINT--
You are declaring variables inside your cursor.
Your entire approach to the problem is 100% wrong. When you finally post ddl and sample data along with the desired results in...
April 19, 2012 at 12:43 pm
Lynn Pettis (4/19/2012)
Sean Lange (4/19/2012)
There are more lines with syntax errors in there than there are lines that will actually work. That can't possibly come...
April 19, 2012 at 12:35 pm
Here is "code" you posted with formatting so it can be read.
declare @P1 nvarchar(32)
declare @mtd2 float
DECLARE @qtd float
declare @ytd float
declare c1 CURSOR FOR
select account,MTDTWR ,QTDTWR,YTDTWR from #temp1
open c1
FETCH NEXT FROM...
April 19, 2012 at 12:34 pm
Really? That won't work? No kidding?
There are more lines with syntax errors in there than there are lines that will actually work. That can't possibly come close to compiling. Your...
April 19, 2012 at 12:32 pm
Honestly I think it is not working because you are in so far over your head you can't even figure out which way is up.
Look at the basic cursor syntax...
April 19, 2012 at 12:15 pm
If the point is to delete all the data why bother with changing recovery models at all, just truncate. Then is it minimally logged and just as fast as dropping...
April 19, 2012 at 11:38 am
Well you could do that I guess...but then you have done nothing but generate a cursor to loop through 55,000+ tables. :w00t:
And why change to simple recovery? That would defeat...
April 19, 2012 at 10:38 am
Viewing 15 posts - 12,316 through 12,330 (of 15,381 total)