Forum Replies Created

Viewing 15 posts - 226 through 240 (of 295 total)

  • RE: SSDT Not Updating Database

    No apology required; it's always worth understanding what the tools are doing for us. As noted in a previous post, the problem I have is also occurring outside SSDT, so...

  • RE: SSDT Not Updating Database

    There is no trigger that would prevent this change. Another constraint change to the same table worked fine.

  • RE: SSDT Not Updating Database

    It's not SSDT after all. As suggested, I tried copying the DROP and CREATE statements from the deployment script into an SSMS window and ran them there. No errors, but...

  • RE: temporary tables (# tables) & tempdb

    If your problem is with joins or comparisons between columns in the temp tables and those in your database, you can specify which collation to use at that point, eg.

    Select...

  • RE: T-SQL interview Questions

    abhishek_300 (7/28/2015)


    Thanks Gila monster for your comments .However for interviews people do not ask simple question on SQL hence you are seeing unrealistic example.

    People don't (always) ask simple questions, but...

  • RE: Hiring for Culture

    "Getting on" with people is an important skill, but it's not defined by being able to socialise outside work. I'm currently in a small(ish) department of about 30 people and...

  • RE: cross join query

    Try changing p1.City_Name != p2.City_Name to p1.City_Name > p2.City_Name - that way you will only pick up the link in one direction.

  • RE: How to improve that query?

    Antares686 (7/13/2015)


    Kutang Pan (7/10/2015)


    Is there any other way to write the below query:

    SELECT

    SUM(CASE WHEN Type = 4 AND STATUS IN (1, 2, 3) THEN Value ELSE 0 END)

    ,SUM(CASE...

  • RE: Comparing/Merging records in single table

    I've worked on a similar process; we had to identify clients across multiple 'unique' identifiers who were actually the same person and where some records had more data populated than...

  • RE: Need Help with Column Grouping

    Yes, use ChrisM's version. Mine would give SalesGrouping according to orderid rather than number of orders.

  • RE: Need Help with Column Grouping

    You can't use the column aliases in the GROUP BY clause; you would either need to repeat the definitions or wrap them in a CTE as below;

    ;WITH OrderGroups as

    (SELECT [orderid]

    ...

  • RE: interview questions

    Enya? When the database is down? Surely it has to be Motorhead?

  • RE: Code Reviews

    We have code reviews for all languages including SQL. The SQL (DDL and DML) is included largely because we don't have a DBA and a lot of very poor code...

  • RE: Need To Improve View Performance

    Update: I tried the J Livingstone solution as a straight SELECT rather than a view definition. It takes about the same time as my solution and has the same duplicates...

  • RE: Need To Improve View Performance

    Thanks for your responses to this.

    J Livingstone, I got an error message trying to create a view with your code; "The ORDER BY clause is invalid in views, inline functions,...

Viewing 15 posts - 226 through 240 (of 295 total)