Forum Replies Created

Viewing 15 posts - 1,711 through 1,725 (of 5,111 total)

  • RE: In Case statement i need to pass subquery. what's the bestway to do it.

    The SQL you have will work, however, I doubt it's what you're after. I've added a couple of extra aliases and a comment to explain this:

    August 24, 2018 at 1:44 am

    #2003156

  • RE: Multiple Joins

    NikosV - Thursday, August 23, 2018 11:28 PM

    Quick question, what does CASE WHEN THEN 1 mean? What's the THEN 1 doing exactly?

    It's...

  • RE: OPTION (USE HINT ( 'FORCE_LEGACY_CARDINALITY_ESTIMATION' ))?

    The fact that they are using it suggest that the view (I assume it's a view with a suffix of _vw), performs poorly with the new estimator. I think the...

  • RE: Move logins to new role

    It's the users you need to change, not the logins. A user is a database object, while a login in Server based.

    You could use some dynamic SQL to...

  • RE: Multiple Joins

    NikosV - Thursday, August 23, 2018 3:42 AM

    OK. Understood. How should the sample data (I imagine you mean records) be displayed to...

  • RE: Multiple Joins

    I can't see any sample data in your SQL, only DDL definitions. I'll need sample data and expected results too please (note that many users, including myself, are unhappy to...

  • RE: Multiple Joins

    Really need to have sample data and expected result now. And, if you have 2 status it can be, have you considered using IN in the CASE expression?

  • RE: Multiple Joins

    YOu really need to get away from using a subquery for EVERY expression (I.e. a WHERE, a JOIN, etc it's awful practice and makes your SQL very difficult to read....

  • RE: Combine rows into a single table

    Have you tried anything so far? If not, consider the simple + operator and FOR XML PATH. Have a go, and if you get stuck please do reply with your...

  • RE: Enforce Unique Constraint Across Two Tables

    Steve Jones - SSC Editor - Wednesday, August 22, 2018 10:07 AM

    Personally, I like the Instead of Trigger, unless you are willing...

  • RE: SQL Server Procedure/Function param issue

    sikka.sourav - Wednesday, August 22, 2018 9:51 AM

    I don't have access to BCP. Can we do it using Procedure ??

    SSIS then? Otherwise,...

  • RE: Multiple Joins

    NikosV - Wednesday, August 22, 2018 7:46 AM

    Hi Thom. Yes that's what I meant. I am counting the amount of claims...

  • RE: Service Master Key

    VastSQL - Wednesday, August 22, 2018 3:55 AM

    Sue_H - Tuesday, August 21, 2018 10:52 AM

  • RE: SSIS suddenly takes longer time to run

    nav_fuel - Tuesday, August 21, 2018 2:21 PM

    vana - Friday, April 24, 2009 8:37 AM

  • RE: Service Master Key

    It's worth noting that if you've upgraded your instance to 2017 (from 2016 or prior), Microsoft also recommend you regenerate your Service Master Key. To quote the documentation:

Viewing 15 posts - 1,711 through 1,725 (of 5,111 total)