TRC is primarily funded by ad revenue. If you like the content you find here, don't block the ads check them out instead. Thank you.
Results 1 to 5 of 5

Thread: Any MSSQL experts?

  1. #1
    Should Get Out More KungFooBob's Avatar
    Join Date
    Aug 2012
    Location
    The Forest Moon of Endor
    Posts
    17,495
    Like
    418
    Liked 7,835 in 4,457 posts

    Default Any MSSQL experts?


    TRC is primarily funded by ad revenue. If you like
    the content you find here, don't block the ads check
    them out instead. Thank you.
    I've got a couple of DAX queries that work well, but I'm trying to convert a PowerBI report to direct access so need to recreate the calculated fields in my SQL View... problem is one of the calculated fields is based on another calculated field and SQL does like that type of thing.

    It's taking a date, working out what the last working day was (-1 on all days except Monday which is -3, etc...) then adds a field with a true/false flag for the most recent 'last working day'.

  2. #2
    Should Get Out More Derek Badger's Avatar
    Join Date
    Dec 2007
    Posts
    28,579
    Like
    2,778
    Liked 2,817 in 1,239 posts

    Default Re: Any MSSQL experts?

    There's a man in Lanzarote who used to be a DBA.

  3. #3
    Should Get Out More KungFooBob's Avatar
    Join Date
    Aug 2012
    Location
    The Forest Moon of Endor
    Posts
    17,495
    Like
    418
    Liked 7,835 in 4,457 posts

    Default Re: Any MSSQL experts?

    Quote Originally Posted by Derek Badger View Post
    There's a man in Lanzarote who used to be a DBA.
    I forgot about him, it's times like this I wish I didn't take the piss so much

  4. The following user liked this post made by KungFooBob:


  5. #4
    Should Get Out More KungFooBob's Avatar
    Join Date
    Aug 2012
    Location
    The Forest Moon of Endor
    Posts
    17,495
    Like
    418
    Liked 7,835 in 4,457 posts

    Default Re: Any MSSQL experts?

    Not that anyone cares... but

    It kind of worked using a variable, but bombed out when I tired to ave it as a view... you can't use local variables in views.

    so I put the value into a derived table and job is a goodun'

    I should stick to infrastructure, it's more my bag.

  6. #5
    Should Get Out More Olly's Avatar
    Join Date
    Jul 2009
    Location
    Darlington
    Posts
    15,617
    Like
    504
    Liked 1,239 in 596 posts

    Default Re: Any MSSQL experts?

    Email me.

Go Back to Forum My Forum

TRC Affiliates - Help TRC make a small amount of commission