Forum Replies Created

Viewing 15 posts - 46 through 60 (of 148 total)

  • RE: convert date in sql

    Try BOL

    Syntax for CONVERT:

    CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

  • RE: Challenging table join problem

    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...

  • RE: Challenging table join problem

    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...

  • RE: Challenging table join problem

    Interesting. Cue bout of furious SQL to investigate 🙂

  • RE: help with updating database

    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,...

  • RE: Challenging table join problem

    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

  • RE: Tab Spacing within SQL code tags

    Well you learn something new every day 🙂

    Text editor changed, thanks for the tip.

  • RE: Evaluating String Arithmetic Expressions In A View

    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,...

  • RE: Text Editor Environment Settings Being Overridden

    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

  • RE: Fill in the blanks...

    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...

  • RE: Text Editor Environment Settings Being Overridden

    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...

  • RE: Fill in the blanks...

    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...

  • RE: Fill in the blanks...

    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...

  • RE: Multiple SSIS via SQL Agent

    Great stuff. Thanks very much for the advice.

  • RE: Multiple SSIS via SQL Agent

    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...

Viewing 15 posts - 46 through 60 (of 148 total)