Forum Replies Created

Viewing 15 posts - 211 through 225 (of 275 total)

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

  • RE: SSMS or SSDT

    Both! We use SSMS for developing/testing. When a project is ready to go into UAT, the changes from development are put into the project in Visual Studio so that they...

  • RE: How Can I Tell the Number of Times People Use SSMS to Change Client Data

    The correct number is zero!

  • RE: Execute Permission Problem on Stored Procedure

    In case it helps anyone with a similar problem, here is the closing summary from MS support.

    Technical Summary : on one of your server, the observed EXECUTE permissions didn’t match...

  • RE: how to answer interview question "what is the hardest sproc you have created?"

    As an antidote to Jeff's quick interview technique; the shortest one I ever had was for a contract position. My backside had barely touched the chair when the interviewer asked...

Viewing 15 posts - 211 through 225 (of 275 total)