Viewing 15 posts - 151 through 165 (of 434 total)
I think that is how it is supposed to work. You do all the hard stuff 😀 and then the rest of us come along and QA it. ...
October 23, 2007 at 7:36 am
Just for S&G I removed your index completely and it didn't change performance time. Still 20 seconds. Here is the table I am using to test with if...
October 23, 2007 at 7:14 am
I copy your code straight from word without any replacing and it works great. I don't lose any leading spaces.
October 23, 2007 at 7:10 am
Peter Larsson (10/23/2007)
I also lack the oppurtunity to call the SP twice in a row.I get an error "index already exists".
I thnk it would make sense to move the create...
October 23, 2007 at 7:02 am
Sandy (10/23/2007)
Great Standard of Code,
I really feel its the way need to be done.
but i have a small issue here,
when i am trying to copy your code...
October 23, 2007 at 7:01 am
I will start with "VERY COOL". 😎
One small fix I had to make to the set up is to switch the from and group by. I'd paste it here but...
October 22, 2007 at 1:01 pm
I don't know about CR but I would suggest starting a new thread for the question so people who do can answer it. You may also want to post...
October 22, 2007 at 7:48 am
SELECT * FROM #TestTable
WHERE (isnull(Title,'Sales Representative') = @dummy)
will return the Sales Reps and nulls together but not with the VPs
October 21, 2007 at 6:50 am
CREATE PROCEDURE [dbo].[sp_DAILYMOVEMENTS] @MyDate DateTime AS
SELECT @MyDate, Description,
MAX(CASE WHEN checkindate @MyDate THEN GuestName ELSE CAST(NULL AS VARCHAR(20)) END) AS Rollover,
MAX(CASE WHEN checkindate = @MyDate THEN GuestName ELSE...
October 20, 2007 at 10:34 am
That is easier.
select orderdate,
sum(case when productno = 1000345 then orderqty else 0 end) as [1000345],
sum(case when productno = 1000355 then orderqty else 0 end) as [1000355],
sum(case when productno = 1000666...
October 19, 2007 at 12:40 pm
Here is a Jeff MOden example I keep in my toolbox
Set NOCount On
---===== If the temp table to hold the results in exists, drop it
IF...
October 19, 2007 at 12:18 pm
you will still need to use STUFF to pad the school code with 0's in front.
October 19, 2007 at 11:47 am
We could help more if we saw your proc but let say right now your proc creates a table by doing
select a,b,c into temptable from permtable
and then your...
October 19, 2007 at 9:12 am
declare @id int
select @id =( select top 1 n from tally where n > 5)
if @id is not null
begin
print 'yes'
print @id
end
else
begin
print 'no'
print @id
end
October 19, 2007 at 8:03 am
Viewing 15 posts - 151 through 165 (of 434 total)