Viewing 15 posts - 11,236 through 11,250 (of 18,923 total)
Ya a chance at 2 index seeks and a concat... Thanx for the info.
November 13, 2006 at 2:49 pm
This list all the records where ALL sub records are closed... chose change to WHERE EXISTS to change the behavior!
Select MainID, Col1, Col2 FROM dbo.Main WHERE NOT EXISTS (SELECT *...
November 13, 2006 at 2:42 pm
Any advantages of using your version VS mine (performance wise)?
November 13, 2006 at 2:39 pm
Sounds to me like it's 41 seconds too long!!!
I think you should put your foot down on this one
.
November 13, 2006 at 2:24 pm
if the alue is 'd' then it checks against the first column, other than 'd' on the 2nd column. All else will return 0 and not return the row!
November 13, 2006 at 2:13 pm
Dare I ask???
How big are the dbs (size and rows)?
November 13, 2006 at 1:40 pm
AND 1 = CASE
WHEN @custom_value='D' AND
AL1.amount between @threshold_value1 and @threshold_value2 THEN 1
WHEN AL1.quantity between Threshold_value1 and @threshold_value2 THEN 1
ELSE 0
END
November 13, 2006 at 1:38 pm
This might be what you need but I can't test to be sure.
and id = @id
and 1 = CASE WHEN Value = 'D' AND Value2 Between @Var1 and @Var2 Then 1
when...
November 13, 2006 at 1:10 pm
Can we have the actual code... the case does nothing in this exemple!!!
I think I need a break now
. Sample code was clear...
November 13, 2006 at 1:08 pm
I see, said the blind man who should have started drinking coffee this morning... ![]()
November 13, 2006 at 1:06 pm
Ya you get 12 rows instead of one... but you still have 12 columns instead of 12!??!
I don't see how that solved the problem... I'm not even sure of how...
November 13, 2006 at 12:43 pm
I just don't see how this can solve the problem. Care to post some sample data, the reuiqred output and wether this code works for you??
November 13, 2006 at 11:55 am
You are correct... it's "sp_" that goes to master first
.
November 13, 2006 at 11:46 am
Ya but that's in Canadian money. So that's only like 1800 US / day
.
November 12, 2006 at 6:26 am
Viewing 15 posts - 11,236 through 11,250 (of 18,923 total)