Viewing 15 posts - 211 through 225 (of 244 total)
this will work as well
select col1,col2
from Table
where col3 = case when @VarName = 'red' then @VarName else col3 end
and col3 <> case when @VarName = 'red' then '-1' else...
December 3, 2009 at 12:42 pm
if u send the table schemas i can give it w proper syntax
i did notice the count(distinct p.progId) had a typo in it. fixed below
select u.id
, count(distinct p.progId)
from user...
December 3, 2009 at 12:31 pm
i think this will work however hard to test w/o actual tables and data
select u.id
, count(distinct piprogId)
from user u
join (
select userid
, max(datecreated) mxProjDate
from project
group by userid
) mx
on u.id = mx.userId
join...
December 3, 2009 at 12:27 pm
-----------------------------------------------------------------------------------------------
--PiMane yesterdy 10:49pm
--cursors are a necessary evil... some tasks just need cursors and there's no way of replacing them
------------------------------------------------------------------------------------------------
The only explanation why I think someone would feel that was is...
December 2, 2009 at 9:34 am
----------------------------------------------------------------------------
--Lynn and I are agreeing with you. john scott miller is the one making odd statements about hair, good guys, and disagreeing with Lynn that cursors have any use at...
December 1, 2009 at 3:02 pm
-----------------------------------------------------------------------------------------------
If you were writing a proc that was supposed to run a log backup command on each active database in Full recovery model, which is a situation where you have...
December 1, 2009 at 2:51 pm
you would hate me then. one of the first things i do is redesign all proc away from cursors. Perhaps i am you arch nemesis and u mine.
The question...
December 1, 2009 at 12:37 pm
cool. And for future reference you should get in the habit of using the ON when joining.
December 1, 2009 at 12:04 pm
You cant exclude them if for instance it is based on time and the threshold that will make the particular constraint true will only hold true while the actual loop...
December 1, 2009 at 11:22 am
I must preface this post w/ the fact that I hate cursors. The simple fact I must allocate and deallocate something drives me batty and if you have embedded transactions...
November 30, 2009 at 4:12 pm
when u say "So record number 8 and 9 would have another random number in the Group column" are u saying those two will have the same random number?
November 25, 2009 at 9:35 am
The funny thing is after i submitted it i actually had to do the exact same thing for work and tried the same approach. Once i started testing the results...
November 25, 2009 at 9:21 am
Did you actually try that, John? It returns exactly the same phone number for all rows.
--Jeff Moden
-------------------------------------------------------------------------------------
No i did not and that is why i am an idiot. Was...
November 25, 2009 at 9:03 am
Hi guys, thanks for the suggestions!
Would something as simple as this work?
UPDATE myTable
SET linkURL = REPLACE(linkURL, 'oldIP', 'newIP')
----------------------------------------------------------------------------------------
--not really because that would replace anywhere in the linkurl that had the...
November 25, 2009 at 6:41 am
Viewing 15 posts - 211 through 225 (of 244 total)