How to get report data base on employee Name split in sql query

coder rock 196 Reputation points
2024-03-17T09:54:41.4266667+00:00

I have written questions in below URL and need output base on employee split.

https://stackoverflow.com/questions/78174575/how-to-get-report-data-base-on-employee-name-split-in-sql-query

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,732 questions
{count} votes

Accepted answer
  1. CosmogHong-MSFT 23,166 Reputation points Microsoft Vendor
    2024-03-18T01:36:11.0866667+00:00

    Hi @coder rock

    For this type of question, you help yourself a lot if you post CREATE TABLE statements for your tables, together with INSERT statements with sample data and the desired result of the given sample. This makes it easy to copy and paste into a query window to develop a tested query and helps to give us better understanding of the problem.

    Regarding this issue, it seems you need a total calculation for each employee. You could have a try on

    GROUP BY ROLLUP or GROUP BY GROUPING SETS ().

    Best regards,

    Cosmog Hong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful