Viewing 15 posts - 46 through 60 (of 148 total)
Try BOL
Syntax for CONVERT:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
October 13, 2011 at 9:41 am
The plan shows it all. 2 scans and a match for the floor method because all it has to do is calculate the new value then merge. With the other...
October 13, 2011 at 9:37 am
Dur, stoopid. Ceilings are higher, not lower. That would be a floor. You can't fault the logic of that 🙂
PRINT '========== CROSS JOIN =========='
SET STATISTICS TIME ON
SELECT *
FROM #Points
CROSS JOIN...
October 13, 2011 at 9:25 am
Interesting. Cue bout of furious SQL to investigate 🙂
October 13, 2011 at 9:18 am
Aluminum (10/13/2011)
Usually the development environment is a copy of production.
Spot on. Assuming that you'll be rolling this code out to Production, you should test it on a Production copy.
Regards,...
October 13, 2011 at 9:14 am
Much simpler (and more efficient) to just ceiling the ranged value I think:
select *
from MyValuesTable
join MyScalesTable
on ceiling(MyValuesTable.ValueFloat) = MyScalesTable.Scale
Cheers, Iain
October 13, 2011 at 9:08 am
Well you learn something new every day 🙂
Text editor changed, thanks for the tip.
September 13, 2011 at 8:02 am
Hi Doug,
I love this sort of problem 🙂
The difficulty with the situation as presented is that each formula is a distinct calculation. Dynamic SQL is the right way to go,...
September 12, 2011 at 12:28 pm
Hi Satya,
Unfortunately, this isn't an option - I have to work with the machine and spec that I have. Any other ideas?
Thanks, Iain
Edit: derp
September 2, 2011 at 3:48 am
Hi Marty,
Here's the combined version to allow you to return the results in one query. I've left you a bit of work to do - you'll need to change the...
September 2, 2011 at 3:24 am
Unfortunately, no. My local account has limited privileges. This is why I'm connecting to SQL with a different account. The SQL account is an admin account. I'm not allowed to...
September 2, 2011 at 2:43 am
Oops, my bad. Replace:
, coalesce(MonthIndex,(select max(MonthIndex) from #interim c where LeaseNumber = cte.C_LeaseNumber and MonthIndex < cte.n)) as MonthToReturn
With
, coalesce(MonthIndex,(select max(MonthIndex) from #interim1 c where LeaseNumber = cte.C_LeaseNumber and...
September 2, 2011 at 2:34 am
Hi Marty,
Here's one way you could do it. Note that this is a bit kludgey. I'll have another look tomorrow.
I've broken the run into simple sections to make it...
September 1, 2011 at 11:22 am
Great stuff. Thanks very much for the advice.
August 11, 2011 at 7:48 am
Thanks Brandie, I'd thought as much. Perhaps you could give me an opinion on my plan to handle this in my situation?
I have a process to create that has three...
August 11, 2011 at 5:52 am
Viewing 15 posts - 46 through 60 (of 148 total)