Viewing 15 posts - 1,591 through 1,605 (of 1,957 total)
Addendum:
To clarify , the WHILE @@ROWCOUNT=3 is just a way of looping until there are no more rows, it could just as easily have been WHILE @@ROWCOUNT<>0, but I...
January 24, 2011 at 5:32 am
ColdCoffee (1/24/2011)
Dave Ballantyne (1/24/2011)
WHILE @@ROWCOUNT=3
Even i have a doubt in the code , Magoo... Do we really need UNPIVOT ? i guess, your code will work even without...
January 24, 2011 at 5:30 am
Dave Ballantyne (1/24/2011)
WHILE @@ROWCOUNT=3
So , you are inserting...
January 24, 2011 at 5:26 am
Dave Ballantyne (1/24/2011)
mister.magoo (1/24/2011)
January 24, 2011 at 5:03 am
Jeff Moden (1/23/2011)
January 24, 2011 at 3:12 am
Jeff Moden (1/23/2011)
January 24, 2011 at 2:14 am
Jeff Moden (1/23/2011)
mister.magoo (1/23/2011)
Hope you can work around this because mine is way too slooooowww! and ugly!
Glad to hear that my code isn't the only slow and ugly one on...
January 23, 2011 at 6:56 pm
Jeff Moden (1/23/2011)
mister.magoo (1/23/2011)
Hope you can work around this because mine is way too slooooowww! and ugly!
Glad to hear that my code isn't the only slow and ugly one on...
January 23, 2011 at 5:52 pm
SwePeso (1/23/2011)
...
Sorry Peso, but while testing mine for more complicated datasets, I came across this one that your latest does not cope with...
INSERT INTO MVTS
(idMvt1,idMvt2,idMvt3)
SELECT 1, 2, 3 UNION ALL
SELECT...
January 23, 2011 at 5:34 pm
... In which case, I guess you need an INSERT trigger that checks whether the current StartDate or EndData overlap with an existing one...
something like...
CREATE TRIGGER PreventOverlap
AFTER INSERT, UPDATE
AS
IF...
January 23, 2011 at 2:22 am
I don't know a good way - you could do it with a trigger but that's not nice...
Have you considered storing the data differently, for example having a table of...
January 22, 2011 at 6:45 pm
In the interest of seeing a SQL solution even though you have a CLR solution...
I offer this
First just the solution (which assumes you have added an "ID" column)
SELECT *
FROM mvts
WHERE...
January 22, 2011 at 6:08 pm
I have to disagree about the root problem.
There are two problems that I see.
1) The table variable with 200 rows is being SCANNED 390,000 times because of the IN.
...
January 20, 2011 at 5:22 pm
You know you can post the sqlplan here and protect your security without too much trouble...
Save the execution plan as sqlplan.
Edit the sqlplan in notepad.
Replace ALL (Ctrl-h) myTable with GenericTable
replace...
January 20, 2011 at 11:14 am
Is it safe to say that the latest call for any phone number will also correspond to the highest "id" for that phone number?
SELECT
log.id,
log.DateCall,
...
January 19, 2011 at 5:25 pm
Viewing 15 posts - 1,591 through 1,605 (of 1,957 total)