locked
Duplicate records should show only once in result set RRS feed

  • Question

  • User1052662409 posted

    Hello Everyone

    Below is my sql query

    SELECT imp_id, 
    (
        SELECT name
        FROM tbl_Employee
        WHERE sno = 11
    ) AS Name,
           CASE
               WHEN tbl_emp_imprest.other_location <= 0
                    OR tbl_emp_imprest.other_location IS NULL
               THEN tbl_projects.location
               ELSE CASE
                        WHEN tblOtherLocation.location IS NULL
                        THEN tbl_projects.location
                        ELSE tblOtherLocation.location
                    END
           END AS Location,
           CASE
               WHEN tbl_emp_imprest.other_location <= 0
                    OR tbl_emp_imprest.other_location IS NULL
               THEN tbl_projects.Sno
               ELSE CASE
                        WHEN tblOtherLocation.location IS NULL
                        THEN tbl_projects.sno
                        ELSE tblOtherLocation.other_location_id
                    END
           END AS location_id,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN dbo.Total_Diesel_Amount(11, 04, 2021)
               ELSE 0
           END AS expenditure, 
           0 AS reco_amount, 
           0 AS approved_amount, 
           0 AS audit_amount,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN dbo.Total_Diesel_Imprest(11, 04, 2021)
               ELSE imp_amount_approved_by_finance
           END AS paid_amount,
    
           ISNULL(imprest_head, 0) AS particular_id, 
           ISNULL(
    (
        SELECT head
        FROM tblHeads
        WHERE head_id = imprest_head
    ), '') AS particular, 
           id
    FROM tbl_emp_imprest
         LEFT JOIN tblOtherLocation ON other_location_id = tbl_emp_imprest.other_location
         LEFT JOIN tbl_projects ON tbl_projects.sno = tbl_emp_imprest.imp_emp_location
    WHERE imp_id = 11
          AND imp_amount_approved_by_finance > 0
          AND expenditure_submit = 0
          AND DATEPART(year, imp_fin_appr_date) = 2021
          AND DATEPART(month, imp_fin_appr_date) = 04;

    This query gives a result set but with some duplicate rows.

    111

    Why these duplicates rows are coming and how remove those from the result set.

    Kindly suggest

    Wednesday, May 5, 2021 7:04 AM

Answers

  • User475983607 posted

    demoninside9

    Still Same result

    Sorry, you must remove the Id column as well.  Come on man, learn basic SQL.  The community has provided links to GROUP BY reference documentation above.  Read the documentation and learn the basic concepts.  Id has the same logial problem as location_id,  the GROUP BY cannot GROUP the IDs because the ID values are not the same in each record.   

    Here's an updated version without Id.  I still cannot verify the code because you did not supply the function, employee table is missing, and the sample data is incomplete.   The JOINs do not return a result set.  

    Declare @diesel_imprest INT;
    Declare @diesel_expenditure INT;
    
    SET @diesel_imprest = dbo.Total_Diesel_Imprest(11, 04, 2021);
    SET @diesel_expenditure = dbo.Total_Diesel_Amount(11, 04, 2021)
    
    SELECT 
        t.imp_id, 
        t.Name,
        t.Location,
        t.expenditure, 
        t.reco_amount, 
        t.approved_amount, 
        t.audit_amount, 
        t.paid_amount, 
        t.particular_id, 
        t.particular
    FROM (
    SELECT   TEI.imp_id, TE.Name
     AS Name,
           CASE
               WHEN TEI.other_location <= 0
                    OR TEI.other_location IS NULL
               THEN tbl_projects.location
               ELSE CASE
                        WHEN tblOtherLocation.location IS NULL
                        THEN tbl_projects.location
                        ELSE tblOtherLocation.location
                    END
           END AS Location,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN @diesel_expenditure
               ELSE 0
           END AS expenditure, 
           0 AS reco_amount, 
           0 AS approved_amount, 
           0 AS audit_amount,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN @diesel_imprest
               ELSE imp_amount_approved_by_finance
           END AS paid_amount,
    
           ISNULL(imprest_head, 0) AS particular_id, 
    
           TH.head AS particular
    FROM tbl_emp_imprest TEI
         JOIN tblHeads TH ON TH.head_id = TEI.imprest_head
         JOIN tbl_Employee TE ON TE.Sno = TEI.imp_id
         LEFT JOIN tblOtherLocation ON other_location_id = TEI.other_location
         LEFT JOIN tbl_projects ON tbl_projects.sno = TEI.imp_emp_location
    WHERE TEI.imp_id = 11
          AND TEI.imp_amount_approved_by_finance > 0
          AND TEI.expenditure_submit = 0
          AND DATEPART(year, TEI.imp_fin_appr_date) = 2021
          AND DATEPART(month, TEI.imp_fin_appr_date) = 04
    ) AS t 
    GROUP BY     
        t.imp_id, 
        t.Name,
        t.Location,
        t.expenditure, 
        t.reco_amount, 
        t.approved_amount, 
        t.audit_amount, 
        t.paid_amount, 
        t.particular_id, 
        t.particular

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 7, 2021 1:35 PM

All replies

  • User1535942433 posted

    Hi demoninside9,

    According to your description and codes, I think,you don't set distinct conditions.

    You could use group by and having count.

    Just like this demo:

    SELECT [FirstName], 
        [LastName], 
        [Country], 
        COUNT(*) AS CNT
    FROM [SampleDB].[dbo].[Employee]
    GROUP BY [FirstName], 
          [LastName], 
          [Country]
    HAVING COUNT(*) > 1;

    More details,you could refer to below article:

    https://www.sqlshack.com/different-ways-to-sql-delete-duplicate-rows-from-a-sql-table/

    Best regards,

    Yijing Sun

    Thursday, May 6, 2021 7:11 AM
  • User1052662409 posted

    Just like this demo:

    Sorry, I am just modifying my statement.

    I only want only one record should be there for particular_id 10, rest particular ids remain same. Right now there are 4 rows for particular_id 10

    Thursday, May 6, 2021 7:32 AM
  • User475983607 posted

    Your requirements are incomplete.  Which locationId do you want out of 54, 19, or 64?

    Thursday, May 6, 2021 10:14 AM
  • User1052662409 posted

    Which locationId do you want out of 54, 19, or 64?

    Whatever the location_id doesn't matter. I only care about the particular_id. For particular_id 10 there should be only 1 row (for now here are 4 rows).

    Because for every row for particular_id 10 the paid_amount and expenditure will always be same.

    So I need only 1 records for particular_id 10 other records will remain same.

    Thursday, May 6, 2021 10:37 AM
  • User475983607 posted

    demoninside9

    Whatever the location_id doesn't matter. I only care about the particular_id. For particular_id 10 there should be only 1 row (for now here are 4 rows).

    Because for every row for particular_id 10 the paid_amount and expenditure will always be same.

    So I need only 1 records for particular_id 10 other records will remain same.

    Then remove location_Id from the result set so GROUP BY or DISTINCT can properly combine the rows. 

    https://www.w3schools.com/sql/sql_groupby.asp

    https://www.w3schools.com/sql/sql_distinct.asp

    Also, share your latest code so the community is not forced to guess.

    Thursday, May 6, 2021 10:38 AM
  • User1052662409 posted

    Then remove locationId from the result set. 

    Sorry, I forgot to mention here, that for other particular_id I need location_id but for particular_id I don't need. (may some very strange for others but I am here to stuck to get these type of result set.)

    Please suggest.

    Thursday, May 6, 2021 10:46 AM
  • User475983607 posted

    demoninside9

    Sorry, I forgot to mention here, that for other particular_id I need location_id but for particular_id I don't need. (may some very strange for others but I am here to stuck to get these type of result set.)

    Please suggest.

    What is the particular_id requirement? 

    I think the best thing to do at this point is for you to learn GROUP BY and/or DISTINCT in SQL.  Also, set aside time to understand your requirements.  

    Thursday, May 6, 2021 11:00 AM
  • User1052662409 posted

    What is a particular_id? 

    particular_id is an id of an item like particular_id 10 = Diesel Expense.

    In my result set Diesel Expense will be same for a emp_id. The amount paid to employee for Diesel Expense 4 times in a month.

    For only Diesel Expense I am doing sum for paid_amount and expense (I need the cumulative amount  for both paid_amount & expenditure for the month) for the selected month (here location_id doesn't matter).

    So that is why I want it only once in the above result set.

    Thursday, May 6, 2021 11:15 AM
  • User475983607 posted

    demoninside9

    particular_id is an id of an item like particular_id 10 = Diesel Expense.

    In my result set Diesel Expense will be same for a emp_id. The amount paid to employee for Diesel Expense 4 times in a month.

    For only Diesel Expense I am doing sum for paid_amount and expense (I need the cumulative amount  for both paid_amount & expenditure for the month) for the selected month (here location_id doesn't matter).

    So that is why I want it only once in the above result set.

    Your requirement is not possible due to the location_id.  GROUP BY is column operation.  Duplicate column are either grouped by value or aggregated using a function like SUM.  

    Your original code is rather confusing and I think the query has bugs.  The location Bamer has location_Id 54, 55, 19, and 64.  The way the original query is written, it can have wrong data.  

    I think you need to go back to the drawing board and rethink the design.

    If you want community support, then you'll need to provide sample table data.  

    Thursday, May 6, 2021 11:37 AM
  • User1052662409 posted

    mgebhard

    Duplicate column are either grouped by value or aggregated using a function like SUM. 

    For doing SUM I took another two variables separately. @diesel_imprest as paid_amount & @diesel_expenditure for expenditure by using the scalar functions Total_Diesel_Imprest(11, 04, 2021) & Total_Diesel_Amount(11, 04, 2021) respectively.

    Declare @diesel_imprest INT;
    Declare @diesel_expenditure INT;
    
    SET @diesel_imprest = dbo.Total_Diesel_Imprest(11, 04, 2021);
    SET @diesel_expenditure = dbo.Total_Diesel_Amount(11, 04, 2021)
    
    SELECT   TEI.imp_id, TE.Name
     AS Name,
           CASE
               WHEN TEI.other_location <= 0
                    OR TEI.other_location IS NULL
               THEN tbl_projects.location
               ELSE CASE
                        WHEN tblOtherLocation.location IS NULL
                        THEN tbl_projects.location
                        ELSE tblOtherLocation.location
                    END
           END AS Location,
           CASE
               WHEN TEI.other_location <= 0
                    OR TEI.other_location IS NULL
               THEN tbl_projects.Sno
               ELSE CASE
                        WHEN tblOtherLocation.location IS NULL
                        THEN tbl_projects.sno
                        ELSE tblOtherLocation.other_location_id
                    END
           END AS location_id,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN @diesel_expenditure
               ELSE 0
           END AS expenditure, 
           0 AS reco_amount, 
           0 AS approved_amount, 
           0 AS audit_amount,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN @diesel_imprest
               ELSE imp_amount_approved_by_finance
           END AS paid_amount,
    
           ISNULL(imprest_head, 0) AS particular_id, 
    
           TH.head AS particular, 
           id
    FROM tbl_emp_imprest TEI
         JOIN tblHeads TH ON TH.head_id = TEI.imprest_head
         JOIN tbl_Employee TE ON TE.Sno = TEI.imp_id
         LEFT JOIN tblOtherLocation ON other_location_id = TEI.other_location
         LEFT JOIN tbl_projects ON tbl_projects.sno = TEI.imp_emp_location
    WHERE TEI.imp_id = 11
          AND TEI.imp_amount_approved_by_finance > 0
          AND TEI.expenditure_submit = 0
          AND DATEPART(year, TEI.imp_fin_appr_date) = 2021
          AND DATEPART(month, TEI.imp_fin_appr_date) = 04

    I am not using SUM / Group by now.

    The result is same as below.

    mgebhard

    Your requirement is not possible due to the location_id.  GROUP BY is column operation.  Duplicate column are either grouped by value or aggregated using a function like SUM.  

    As I am not using SUM /GROUP By, now it is possible? to have only 1 rows for particular_id  = 10?

    Thursday, May 6, 2021 5:10 PM
  • User475983607 posted

    demoninside9

    As I am not using SUM /GROUP By, now it is possible? to have only 1 rows for particular_id  = 10?

    Lets say there is one row for particular_id = 10.   What is the value of location_id?

    IMHO, the SQL script does not make sense.  As a matter of fact it looks like the script returns bad data.   It's a lot easier for the community to help if you provide a script to build the source tables with sample data. 

    Thursday, May 6, 2021 5:48 PM
  • User1052662409 posted

    Lets say there is one row for particular_id = 10.   What is the value of location_id?

    See, I have given a option to employee they have put other location (apart from their default location which is in their session), so some of employees put (mistakenly, without knowing that their default location will come automatically & that is why you see the The location Bamer has location_Id 54, 55, 19, and 64.) their default location in other location. But for always I will count their default location for particular_id=10.

    So as result I don't care what is the location_id for a particular_id, I will always take it user's default location.

    It's a lot easier for the community to help if you provide a script to build the source tables with sample data.

    CREATE TABLE [dbo].[tbl_emp_imprest](
    	[id] [int] IDENTITY(1,1) NOT NULL,
    	[imp_name] [varchar](max) NOT NULL,
    	[imp_id] [int] NULL,
    	[imp_amount] [int] NULL,
    	[imp_amount_approved] [int] NULL,
    	[imp_expense_head] [varchar](max) NOT NULL,
    	[imp_rq_detail] [varchar](500) NULL,
    	[imp_payee_name] [varchar](500) NULL,
    	[imp_requested_by] [varchar](max) NOT NULL,
    	[imp_emp_location] [int] NULL,
    	[imp_req_date] [datetime] NULL,
    	[imp_status] [int] NULL,
    	[imp_mgr_comment] [varchar](max) NULL,
    	[imp_fin_comment] [varchar](max) NULL,
    	[imp_admin_comment] [varchar](max) NULL,
    	[imp_mgr_appr_date] [datetime] NULL,
    	[imp_fin_appr_date] [datetime] NULL,
    	[imp_admin_appr_date] [datetime] NULL,
    	[prev_status] [int] NULL,
    	[imp_mgr] [int] NULL,
    	[imp_fin] [int] NULL,
    	[imp_admin] [int] NULL,
    	[imp_amount_approved_by_admin] [int] NULL,
    	[imp_amount_approved_by_finance] [int] NULL,
    	[role] [int] NULL,
    	[other_location] [int] NULL,
    	[imprest_type] [nvarchar](500) NULL,
    	[imprest_head] [int] NULL,
    	[requirement_date] [datetime] NULL,
    	[expenditure_submit] [bit] NULL,
    PRIMARY KEY CLUSTERED 
    (
    	[id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

    Friday, May 7, 2021 4:50 AM
  • User1535942433 posted

    Hi demoninside9,

    Since you don't care of location_id, you need group by  particular_id.

    Best regards,

    Yijing Sun

    Friday, May 7, 2021 8:26 AM
  • User1052662409 posted

    you need group by  particular_id.

    It will group by for all particular ids, but I don't want this. I want only and only sum for particular_id = 10

    Friday, May 7, 2021 9:14 AM
  • User475983607 posted

    You need to come to terms with the fact that your SQL script is poorly designed.  

    As requested several times, share all 4 table schemas and sample data.  This will allow the community to write a proper SQL script and provide guidance.

    It will group by for all particular ids, but I don't want this. I want only and only sum for particular_id = 10

    We've already covered this above.  You need to tell us what to do with the location_id!!!

    If you do not care about proper design, then you can hack you current script as shown below.  I removed location_Id and wrapped a select around your initial query with a GROUP BY.  Keep in mind, I do not have your tables or data so there is no way to verify the code.

    Declare @diesel_imprest INT;
    Declare @diesel_expenditure INT;
    
    SET @diesel_imprest = dbo.Total_Diesel_Imprest(11, 04, 2021);
    SET @diesel_expenditure = dbo.Total_Diesel_Amount(11, 04, 2021)
    
    SELECT 
        t.imp_id, 
        t.Name,
        t.Location,
        t.expenditure, 
        t.reco_amount, 
        t.approved_amount, 
        t.audit_amount, 
        t.paid_amount, 
        t.particular_id, 
        t.particular, 
        t.id
    FROM (
    SELECT   TEI.imp_id, TE.Name
     AS Name,
           CASE
               WHEN TEI.other_location <= 0
                    OR TEI.other_location IS NULL
               THEN tbl_projects.location
               ELSE CASE
                        WHEN tblOtherLocation.location IS NULL
                        THEN tbl_projects.location
                        ELSE tblOtherLocation.location
                    END
           END AS Location,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN @diesel_expenditure
               ELSE 0
           END AS expenditure, 
           0 AS reco_amount, 
           0 AS approved_amount, 
           0 AS audit_amount,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN @diesel_imprest
               ELSE imp_amount_approved_by_finance
           END AS paid_amount,
    
           ISNULL(imprest_head, 0) AS particular_id, 
    
           TH.head AS particular, 
           id
    FROM tbl_emp_imprest TEI
         JOIN tblHeads TH ON TH.head_id = TEI.imprest_head
         JOIN tbl_Employee TE ON TE.Sno = TEI.imp_id
         LEFT JOIN tblOtherLocation ON other_location_id = TEI.other_location
         LEFT JOIN tbl_projects ON tbl_projects.sno = TEI.imp_emp_location
    WHERE TEI.imp_id = 11
          AND TEI.imp_amount_approved_by_finance > 0
          AND TEI.expenditure_submit = 0
          AND DATEPART(year, TEI.imp_fin_appr_date) = 2021
          AND DATEPART(month, TEI.imp_fin_appr_date) = 04
    ) AS t 
    GROUP BY     
        t.imp_id, 
        t.Name,
        t.Location,
        t.expenditure, 
        t.reco_amount, 
        t.approved_amount, 
        t.audit_amount, 
        t.paid_amount, 
        t.particular_id, 
        t.particular, 
        t.id

    Friday, May 7, 2021 10:55 AM
  • User1052662409 posted

    mgebhard

    If you do not care about proper design, then you can hack you current script as shown below.  I removed location_Id and wrapped a select around your initial query with a GROUP BY.  Keep in mind, I do not have your tables or data so there is no way to verify the code.

    Still Same result

    Capture

    mgebhard

    We've already covered this above.  You need to tell us what to do with the location_id!!!

    location_id doesn't matter for particular_id=10 (Already mentioned in above)

    mgebhard

    As requested several times, share all 4 table schemas and sample data.  This will allow the community to write a proper SQL script and provide guidance.

    CREATE TABLE [dbo].[tbl_emp_imprest](
    	[id] [int] IDENTITY(1,1) NOT NULL,
    	[imp_name] [varchar](max) NOT NULL,
    	[imp_id] [int] NULL,
    	[imp_amount] [int] NULL,
    	[imp_amount_approved] [int] NULL,
    	[imp_expense_head] [varchar](max) NOT NULL,
    	[imp_rq_detail] [varchar](500) NULL,
    	[imp_payee_name] [varchar](500) NULL,
    	[imp_requested_by] [varchar](max) NOT NULL,
    	[imp_emp_location] [int] NULL,
    	[imp_req_date] [datetime] NULL,
    	[imp_status] [int] NULL,
    	[imp_mgr_comment] [varchar](max) NULL,
    	[imp_fin_comment] [varchar](max) NULL,
    	[imp_admin_comment] [varchar](max) NULL,
    	[imp_mgr_appr_date] [datetime] NULL,
    	[imp_fin_appr_date] [datetime] NULL,
    	[imp_admin_appr_date] [datetime] NULL,
    	[prev_status] [int] NULL,
    	[imp_mgr] [int] NULL,
    	[imp_fin] [int] NULL,
    	[imp_admin] [int] NULL,
    	[imp_amount_approved_by_admin] [int] NULL,
    	[imp_amount_approved_by_finance] [int] NULL,
    	[role] [int] NULL,
    	[other_location] [int] NULL,
    	[imprest_type] [nvarchar](500) NULL,
    	[imprest_head] [int] NULL,
    	[requirement_date] [datetime] NULL,
    	[expenditure_submit] [bit] NULL,
    PRIMARY KEY CLUSTERED 
    (
    	[id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[tbl_Projects]    Script Date: 07-05-2021 17:01:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[tbl_Projects](
    	[Sno] [int] IDENTITY(1,1) NOT NULL,
    	[Project_Id] [nvarchar](50) NULL,
    	[Project_Name] [nvarchar](200) NULL,
    	[Location] [nvarchar](50) NULL,
    	[PMC] [nvarchar](50) NULL,
    	[first_pipe_received_date] [smalldatetime] NULL,
    	[last_pipe_issue_date] [smalldatetime] NULL,
    	[project_owner] [nvarchar](50) NULL,
    	[pipe_supplier] [nvarchar](50) NULL,
    	[state] [nvarchar](50) NULL,
    	[first_pipe_issue_date] [smalldatetime] NULL,
    	[last_pipe_received_date] [smalldatetime] NULL,
    	[serial_no] [int] NULL,
    	[status] [nvarchar](5) NULL
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[tblHeads]    Script Date: 07-05-2021 17:01:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[tblHeads](
    	[head_id] [int] IDENTITY(1,1) NOT NULL,
    	[head] [nvarchar](500) NULL,
    	[head_type] [nvarchar](500) NULL
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[tblOtherLocation]    Script Date: 07-05-2021 17:01:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[tblOtherLocation](
    	[other_location_id] [int] IDENTITY(1,1) NOT NULL,
    	[location] [nvarchar](500) NULL
    ) ON [PRIMARY]
    GO
    SET IDENTITY_INSERT [dbo].[tbl_emp_imprest] ON 
    GO

    Data as below

    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (105, N'Gidijala Satish', 1211, 3000, 3000, N'', N'Site expansion and diesel', N'LandMark', N'Gidijala Satish', 21, CAST(N'2020-06-01T20:24:04.737' AS DateTime), 3, N'Approved by : Bhuvan Chandra', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-01T20:24:04.737' AS DateTime), CAST(N'2020-06-01T15:36:08.207' AS DateTime), CAST(N'2020-06-01T10:14:28.537' AS DateTime), 2, 6, 7, 2, 3000, 3000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (106, N'Ankit Kumar', 32, 3000, 3000, N'', N'diesel,site expense', N'LandMark', N'Ankit Kumar', 40, CAST(N'2020-06-01T20:48:13.007' AS DateTime), 3, N'Approved by : Sunil Kumar Gupta', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-01T20:24:04.737' AS DateTime), CAST(N'2020-06-01T15:36:08.207' AS DateTime), CAST(N'2020-06-01T10:14:28.537' AS DateTime), 2, 8, 7, 2, 3000, 3000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (107, N'Banti Kumar ', 54, 5000, 5000, N'', N'Disal & other expence', N'LandMark', N'Banti Kumar ', 7, CAST(N'2020-06-01T20:54:41.173' AS DateTime), 3, N'Approved by : Vikram Sarraf', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-01T13:54:10.297' AS DateTime), CAST(N'2020-06-01T15:36:08.207' AS DateTime), CAST(N'2020-06-01T13:57:54.193' AS DateTime), 2, 9, 7, 2, 5000, 5000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (108, N'Barun Mondal', 1188, 5000, 5000, N'', N'Diesel,petrol,land agreement & site expense.', N'LandMark', N'Barun Mondal', 22, CAST(N'2020-06-01T09:38:53.620' AS DateTime), 3, N'Approved by : Bhuvan Chandra', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-02T10:18:09.007' AS DateTime), CAST(N'2020-06-02T13:09:39.823' AS DateTime), CAST(N'2020-06-02T11:20:07.977' AS DateTime), 2, 6, 7, 2, 5000, 5000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (112, N'Sagar Mishra', 24, 750, 750, N'', N'water pament', N'LandMark', N'Sagar Mishra', 27, CAST(N'2020-06-01T09:48:25.903' AS DateTime), 3, N'Approved by : Vikram Sarraf', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-01T13:35:33.363' AS DateTime), CAST(N'2020-06-01T15:36:08.207' AS DateTime), CAST(N'2020-06-01T13:57:54.177' AS DateTime), 2, 9, 7, 2, 750, 750, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (113, N'Chhotilal Prasad', 1209, 2000, 2000, N'', N'Crane diesel and agreement stamps', N'LandMark', N'Chhotilal Prasad', 26, CAST(N'2020-06-01T09:54:03.727' AS DateTime), 3, N'Approved by : Vikram Sarraf', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-01T13:54:10.297' AS DateTime), CAST(N'2020-06-01T15:36:08.207' AS DateTime), CAST(N'2020-06-01T13:57:54.177' AS DateTime), 2, 9, 7, 2, 2000, 2000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (114, N'Dipak Kumar Jha', 1225, 2000, 2000, N'', N'Yard puja ,crane diesel, miscellaneous', N'LandMark', N'Dipak Kumar Jha', 53, CAST(N'2020-06-01T10:31:39.670' AS DateTime), 3, N'Approved by : Vikram Sarraf', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-01T13:54:10.297' AS DateTime), CAST(N'2020-06-01T15:36:08.207' AS DateTime), CAST(N'2020-06-01T13:57:54.177' AS DateTime), 2, 9, 7, 2, 2000, 2000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (115, N'Balram Pandey', 1229, 8000, 4000, N'', N'Site Maintenance', N'LandMark', N'Balram Pandey', 46, CAST(N'2020-06-01T10:56:14.493' AS DateTime), 3, N'Approved by : Vikram Sarraf', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-01T13:54:10.297' AS DateTime), CAST(N'2020-06-01T15:36:08.207' AS DateTime), CAST(N'2020-06-01T13:57:54.177' AS DateTime), 2, 9, 7, 2, 4000, 4000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (116, N'Managobinda Khuntia', 20, 5000, 5000, N'', N'Diesel, daily wages, petrol ', N'LandMark', N'Managobinda Khuntia', 52, CAST(N'2020-06-02T08:25:25.420' AS DateTime), 3, N'Approved by : Bhuvan Chandra', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-02T10:18:09.007' AS DateTime), CAST(N'2020-06-02T13:09:39.823' AS DateTime), CAST(N'2020-06-02T11:20:07.977' AS DateTime), 2, 6, 7, 2, 5000, 5000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (117, N'Swaroj Bairagya', 1230, 10000, 10000, N'', N'Diesel, petrol, site mis,', N'LandMark', N'Swaroj Bairagya', 49, CAST(N'2020-06-02T09:10:27.593' AS DateTime), 3, N'Approved by : Vikram Sarraf', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-02T10:07:50.423' AS DateTime), CAST(N'2020-06-02T13:09:39.823' AS DateTime), CAST(N'2020-06-02T11:20:07.977' AS DateTime), 2, 9, 7, 2, 10000, 10000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (126, N'Sunil Kumar Gupta', 8, 10000, 10000, N'', N'Pipe unloading at alighar', N'LandMark', N'Sunil Kumar Gupta', 29, CAST(N'2020-06-02T12:04:19.843' AS DateTime), 3, NULL, N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-01T23:34:19.840' AS DateTime), CAST(N'2020-06-02T13:09:39.823' AS DateTime), CAST(N'2020-06-02T12:10:40.693' AS DateTime), 2, NULL, 7, 2, 10000, 10000, 1, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (128, N'Sagar Mishra', 24, 1500, 1000, N'', N'Localcanvance.mislinesh', N'LandMark', N'Sagar Mishra', 27, CAST(N'2020-06-03T10:32:31.520' AS DateTime), 3, N'Approved by : Vikram Sarraf', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-04T10:55:43.483' AS DateTime), CAST(N'2020-06-04T14:31:26.250' AS DateTime), CAST(N'2020-06-04T11:18:29.853' AS DateTime), 2, 9, 7, 2, 1000, 1000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (132, N'Managobinda Khuntia', 20, 10000, 10000, N'', N'Diesel, daily wages, petrol,bharat medical bill,', N'LandMark', N'Managobinda Khuntia', 52, CAST(N'2020-06-04T08:18:02.697' AS DateTime), 3, N'Approved by : Bhuvan Chandra', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-04T10:34:19.250' AS DateTime), CAST(N'2020-06-04T14:31:26.250' AS DateTime), CAST(N'2020-06-04T11:12:05.773' AS DateTime), 2, 6, 7, 2, 10000, 10000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_emp_imprest] ([id], [imp_name], [imp_id], [imp_amount], [imp_amount_approved], [imp_expense_head], [imp_rq_detail], [imp_payee_name], [imp_requested_by], [imp_emp_location], [imp_req_date], [imp_status], [imp_mgr_comment], [imp_fin_comment], [imp_admin_comment], [imp_mgr_appr_date], [imp_fin_appr_date], [imp_admin_appr_date], [prev_status], [imp_mgr], [imp_fin], [imp_admin], [imp_amount_approved_by_admin], [imp_amount_approved_by_finance], [role], [other_location], [imprest_type], [imprest_head], [requirement_date], [expenditure_submit]) VALUES (141, N'Ashok Kumar Arya', 22, 4000, 4000, N'', N'Room Rent month of may 2020', N'LandMark', N'Ashok Kumar Arya', 10, CAST(N'2020-06-04T09:29:31.127' AS DateTime), 3, N'Approved by : Bhuvan Chandra', N'Approved by : Deepak Chadha', N'Approved by : R Gupta', CAST(N'2020-06-06T10:04:58.960' AS DateTime), CAST(N'2020-06-06T12:26:01.237' AS DateTime), CAST(N'2020-06-06T12:30:22.670' AS DateTime), 2, 6, 7, 2, 4000, 4000, 0, NULL, NULL, NULL, NULL, 0)
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (29, N'NA', N'NA', N'Delhi-Head-Office', N'NA', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (3, N'PROJ0002', N'Jagdishpur- Haldia-Phulpur Pipeline Project (JHPPL)', N'Varanasi ', N'Mecon Limited', CAST(N'2017-12-10T00:00:00' AS SmallDateTime), CAST(N'2018-11-09T00:00:00' AS SmallDateTime), N'GAIL', N'MAN Industries Ltd.', N'U P', NULL, NULL, 0, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (4, N'PROJ0003', N'Jagdishpur- Haldia-Phulpur Pipeline Project (JHPPL)', N'Dehri-On- Son ', N'Mecon Limited', CAST(N'2016-10-17T00:00:00' AS SmallDateTime), CAST(N'2018-10-01T00:00:00' AS SmallDateTime), N'GAIL', N'MAN Industries Ltd.', N'Bihar', NULL, NULL, 0, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (5, N'PROJ0004', N'Panipat- Ambala- Jalandhar Pipeline Project (PAJPL)', N'Garhshankar ', N'N/A', CAST(N'2017-04-17T00:00:00' AS SmallDateTime), CAST(N'2018-09-24T00:00:00' AS SmallDateTime), N'IOCL', N'Maharashtra Seamless Ltd.', N'Punjab', NULL, NULL, 0, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (8, N'PROJ0007', N'Paradip- Haldia- Durgapur Pipeline Project', N'Maranchi ', N'N/A', CAST(N'2017-07-20T00:00:00' AS SmallDateTime), NULL, N'IOCL', N'Surya Roshni Limited', N'Bihar', CAST(N'2018-07-21T00:00:00' AS SmallDateTime), CAST(N'2018-03-16T00:00:00' AS SmallDateTime), 6, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (12, N'PROJ00011', N'Palanpur Vadodara Pipeline Project (PVPL)', N'Vish Nagar ', N'EIL', CAST(N'2017-09-15T00:00:00' AS SmallDateTime), CAST(N'2018-05-31T00:00:00' AS SmallDateTime), N'HPCL', N'MAN Industries Ltd.', N'Gujarat', CAST(N'2017-09-28T00:00:00' AS SmallDateTime), CAST(N'2018-01-25T00:00:00' AS SmallDateTime), 10, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (13, N'PROJ00012', N'Bhubaneshwar- Paradeep- Cuttuck Project', N'Dasrathpur ', N'Mecon Limited', CAST(N'2018-04-04T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Welspun Corp Ltd.', N'Odisha', CAST(N'2018-04-13T00:00:00' AS SmallDateTime), CAST(N'2018-08-20T00:00:00' AS SmallDateTime), 11, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (14, N'PROJ00013', N'Angul- Dhamra Pipeline Project (ADPL)', N'Dasrathpur-2 ', N'Mecon Limited', CAST(N'2018-05-07T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Welspun Corp Ltd.', N'Odisha', CAST(N'2018-07-15T00:00:00' AS SmallDateTime), CAST(N'2018-05-08T00:00:00' AS SmallDateTime), 12, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (16, N'PROJ00015', N'Bokaro- Angul Pipeline Project (BAPL)', N'Sambalpur ', N'Mecon Limited', CAST(N'2018-03-26T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Welspun Corp Ltd.', N'Odisha', CAST(N'2018-07-03T00:00:00' AS SmallDateTime), CAST(N'2018-10-06T00:00:00' AS SmallDateTime), 14, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (17, N'PROJ00016', N'Bokaro- Angul Pipeline Project (BAPL)', N'Khunti ', N'Mecon Limited', CAST(N'2018-03-05T00:00:00' AS SmallDateTime), CAST(N'2019-06-04T00:00:00' AS SmallDateTime), N'GAIL', N'Welspun Corp Ltd.', N'Jharkhand', NULL, NULL, 0, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (20, N'PROJ00019', N'Vijaypur- Auriya Pipeline Project (VAPL)', N'Datia ', N'EIL', CAST(N'2018-08-11T00:00:00' AS SmallDateTime), CAST(N'2020-02-12T00:00:00' AS SmallDateTime), N'GAIL', N'Ratnamani Metals & Tubes Ltd', N'M.P', CAST(N'2018-11-24T00:00:00' AS SmallDateTime), CAST(N'2018-10-04T00:00:00' AS SmallDateTime), 14, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (21, N'PROJ00020', N'Paradip- Hydrabad Pipeline Project (PHPL)', N'Bondapalli ', N'N/A', CAST(N'2018-07-22T00:00:00' AS SmallDateTime), CAST(N'2021-03-18T00:00:00' AS SmallDateTime), N'IOCL', N'Ratnamani Metals & Tubes Ltd', N'Andhra Pradesh', CAST(N'2019-01-23T00:00:00' AS SmallDateTime), CAST(N'2018-11-05T00:00:00' AS SmallDateTime), 19, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (22, N'PROJ00021', N'Paradip- Hydrabad Pipeline Project (PHPL)', N'Nandigam ', N'N/A', CAST(N'2018-08-06T00:00:00' AS SmallDateTime), CAST(N'2020-11-30T00:00:00' AS SmallDateTime), N'IOCL', N'Ratnamani Metals & Tubes Ltd', N'Andhra Pradesh', CAST(N'2018-11-23T00:00:00' AS SmallDateTime), CAST(N'2018-12-11T00:00:00' AS SmallDateTime), 20, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (23, N'PROJ00022', N'Paradip- Hydrabad Pipeline Project (PHPL)', N'Suryapet ', N'N/A', CAST(N'2018-08-02T00:00:00' AS SmallDateTime), CAST(N'2020-07-08T00:00:00' AS SmallDateTime), N'IOCL', N'Surya Roshni Ltd.', N'Telangana', CAST(N'2018-08-14T00:00:00' AS SmallDateTime), CAST(N'2019-01-11T00:00:00' AS SmallDateTime), 21, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (26, N'PROJ00025', N'Dobhi-Durgapur Pipe Line Project (DDPL)', N'Hazaribagh ', N'Engineers India Ltd. (EIL)', CAST(N'2018-08-04T00:00:00' AS SmallDateTime), CAST(N'2020-10-06T00:00:00' AS SmallDateTime), N'GAIL', N'Welspun Corp Ltd.', N'Jharkhand', CAST(N'2018-09-06T00:00:00' AS SmallDateTime), CAST(N'2018-11-05T00:00:00' AS SmallDateTime), 24, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (6, N'PROJ0005', N'Gorakhpur-Phulpur- Haldia Pipeline Project (GSPH)', N'Azamgarh ', N'Mecon Limited', CAST(N'2017-07-25T00:00:00' AS SmallDateTime), CAST(N'2018-06-25T00:00:00' AS SmallDateTime), N'GAIL', N'North China Petroleum Corp Ltd', N'U.P', NULL, NULL, 0, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (7, N'PROJ0006', N'Paradip- Haldia- Durgapur Pipeline Project ', N'Munger ', N'N/A', CAST(N'2017-07-20T00:00:00' AS SmallDateTime), NULL, N'IOCL', N'Surya Roshni Limited', N'Bihar', CAST(N'2018-07-21T00:00:00' AS SmallDateTime), CAST(N'2018-03-16T00:00:00' AS SmallDateTime), 5, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (9, N'PROJ0008', N'Paradip- Haldia- Durgapur Pipeline Project', N'Sampatchak', N'N/A', CAST(N'2017-12-01T00:00:00' AS SmallDateTime), NULL, N'IOCL', N'Surya Roshni Limited', N'Bihar', CAST(N'2018-10-16T00:00:00' AS SmallDateTime), NULL, 7, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (10, N'PROJ0009', N'Replacement Pipeline Project in Gujarat ', N'Karjan ', N'Mecon Limited', CAST(N'2015-08-11T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Ratnamani/ Sura/ Welspun', N'Gujarat', CAST(N'2016-02-21T00:00:00' AS SmallDateTime), CAST(N'2020-07-03T00:00:00' AS SmallDateTime), 8, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (11, N'PROJ00010', N'Replacement Pipeline Project in Gujarat Region (GPRP)', N'Kalol ', N'Mecon Limited', CAST(N'2016-07-12T00:00:00' AS SmallDateTime), CAST(N'2020-07-03T00:00:00' AS SmallDateTime), N'GAIL', N'Surya Roshni Ltd./ Ratnamani', N'Gujarat', CAST(N'2017-03-20T00:00:00' AS SmallDateTime), NULL, 9, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (15, N'PROJ00014', N'Angul- Dhamra Pipeline Project (ADPL)', N'Kamakhya Nagar ', N'Mecon Limited', CAST(N'2018-03-18T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Welspun Corp Ltd.', N'Odisha', CAST(N'2018-03-20T00:00:00' AS SmallDateTime), NULL, 13, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (18, N'PROJ00017', N'Vijaypur- Auriya Pipeline Project (VAPL)', N'Mahu - Welspun', N'EIL', CAST(N'2018-03-08T00:00:00' AS SmallDateTime), CAST(N'2019-12-26T00:00:00' AS SmallDateTime), N'GAIL', N'Welspun Corp Ltd.', N'M.P', CAST(N'2018-04-20T00:00:00' AS SmallDateTime), CAST(N'2018-08-20T00:00:00' AS SmallDateTime), 12, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (19, N'PROJ00018', N'Vijaypur- Auriya Pipeline Project (VAPL)', N'Mahu - Ratnamani', N'EIL', CAST(N'2018-09-04T00:00:00' AS SmallDateTime), CAST(N'2019-12-26T00:00:00' AS SmallDateTime), N'GAIL', N'Ratnamani Metals & Tubes Ltd', N'M.P', CAST(N'2018-10-07T00:00:00' AS SmallDateTime), CAST(N'2018-10-07T00:00:00' AS SmallDateTime), 13, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (42, N'PROJ00040', N'Barauni Guwahati Pipeline Project (BGPL)', N'Barpeta - Welspun', N'Mecon Ltd.', CAST(N'2019-02-19T00:00:00' AS SmallDateTime), CAST(N'2020-10-30T00:00:00' AS SmallDateTime), N'GAIL', N'Welspun Corp Ltd.', N'Assam', CAST(N'2019-03-08T00:00:00' AS SmallDateTime), CAST(N'2019-11-15T00:00:00' AS SmallDateTime), 37, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (43, N'PROJ00041', N'Barauni Guwahati Pipeline Project', N'Purnia -Welspun', N'Mecon Ltd.', CAST(N'2019-02-23T00:00:00' AS SmallDateTime), CAST(N'2020-02-14T00:00:00' AS SmallDateTime), N'GAIL', N'Welspun Corp Ltd.', N'Bihar', CAST(N'2019-05-05T00:00:00' AS SmallDateTime), CAST(N'2019-11-04T00:00:00' AS SmallDateTime), 38, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (24, N'PROJ00023', N'Dobhi-Durgapur Pipe Line Project (DDPL)', N'Durgapur', N'Engineers India Ltd. (EIL)', CAST(N'2018-08-26T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Welspun Corp Ltd.', N'West Bengal', CAST(N'2018-12-20T00:00:00' AS SmallDateTime), CAST(N'2019-06-30T00:00:00' AS SmallDateTime), 22, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (25, N'PROJ00024', N'Dobhi-Durgapur Pipe Line Project (DDPL)', N'Purulia - Welspun', N'Engineers India Ltd. (EIL)', CAST(N'2018-06-18T00:00:00' AS SmallDateTime), CAST(N'2019-11-22T00:00:00' AS SmallDateTime), N'GAIL', N'Welspun Corp Ltd.', N'West Bengal', CAST(N'2019-02-28T00:00:00' AS SmallDateTime), NULL, 23, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (27, N'PROJ00026', N'Dobhi-Durgapur Pipe Line Project (DDPL)', N'Gaya ', N'Engineers India Ltd. (EIL)', CAST(N'2018-08-17T00:00:00' AS SmallDateTime), CAST(N'2020-10-19T00:00:00' AS SmallDateTime), N'GAIL', N'Welspun Corp Ltd.', N'Bihar', CAST(N'2018-08-28T00:00:00' AS SmallDateTime), CAST(N'2018-10-09T00:00:00' AS SmallDateTime), 25, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (32, N'PROJ00030', N'Dhobi-Durgapur-Haldia Pipeline Project', N'Jajpur', N'Mecon Limited / EIL', CAST(N'2018-09-09T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'MAN Industries Ltd.', N'Odisha', CAST(N'2018-11-06T00:00:00' AS SmallDateTime), CAST(N'2019-01-11T00:00:00' AS SmallDateTime), 27, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (33, N'PROJ00031', N'Barauni Guwahati Pipeline Project (BGPL)', N'Purnia - Sparco', N'Mecon Limited', CAST(N'2019-05-29T00:00:00' AS SmallDateTime), CAST(N'2020-10-22T00:00:00' AS SmallDateTime), N'GAIL', N'Sparco Multiplast Pvt. Ltd.', N'Bihar', CAST(N'2019-07-12T00:00:00' AS SmallDateTime), CAST(N'2019-09-15T00:00:00' AS SmallDateTime), 28, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (34, N'PROJ00032', N'Barauni Guwahati Pipeline Project (BGPL)', N'Barpeta - Sparco', N'Mecon Limited', CAST(N'2019-02-16T00:00:00' AS SmallDateTime), CAST(N'2020-07-04T00:00:00' AS SmallDateTime), N'GAIL', N'Sparco Multiplast Pvt. Ltd.', N'Assam', CAST(N'2019-03-16T00:00:00' AS SmallDateTime), CAST(N'2020-02-15T00:00:00' AS SmallDateTime), 29, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (35, N'PROJ00033', N'Barauni Guwahati Pipeline Project', N'Cooch Behar - Sparco', N'Mecon Limited', CAST(N'2018-11-16T00:00:00' AS SmallDateTime), CAST(N'2019-10-16T00:00:00' AS SmallDateTime), N'GAIL', N'Sparco Multiplast Pvt. Ltd.', N'West Bengal', NULL, NULL, 30, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (36, N'PROJ00034', N'Vijaywada Dharampuri Pipeline Project', N'Donakonda ', N'Worley Parsons', CAST(N'2019-01-19T00:00:00' AS SmallDateTime), CAST(N'2020-07-07T00:00:00' AS SmallDateTime), N'HPCL', N'Jindal Saw Ltd', N'Andhra Pradesh', CAST(N'2019-03-24T00:00:00' AS SmallDateTime), CAST(N'2019-09-12T00:00:00' AS SmallDateTime), 26, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (37, N'PROJ00035', N'Vijaywada Dharampuri Pipeline Project', N'Pormamilla ', N'Worley Parsons', CAST(N'2019-01-19T00:00:00' AS SmallDateTime), CAST(N'2020-09-30T00:00:00' AS SmallDateTime), N'HPCL', N'Jindal Saw Ltd', N'Andhra Pradesh', CAST(N'2019-04-23T00:00:00' AS SmallDateTime), CAST(N'2019-09-06T00:00:00' AS SmallDateTime), 27, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (40, N'PROJ00038', N'Vijaywada Dharampuri Pipeline Project', N'V'' Kota ', N'Worley Parsons', CAST(N'2019-01-18T00:00:00' AS SmallDateTime), NULL, N'HPCL', N'Jindal Saw Ltd', N'Andhra Pradesh', CAST(N'2019-10-18T00:00:00' AS SmallDateTime), CAST(N'2019-09-11T00:00:00' AS SmallDateTime), 35, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (44, N'PROJ00042', N'Barauni Guwahati Pipeline Project (BGPL)', N'Cooch Behar-Welspun', N'Mecon Ltd.', CAST(N'2019-02-16T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Welspun Corp Ltd.', N'West Bengal', NULL, CAST(N'2019-11-03T00:00:00' AS SmallDateTime), 39, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (45, N'PROJ00043', N'Barauni Guwahati Pipeline Project ( BGPL)', N'Cooch Behar-Ratnamani', N'Mecon Ltd.', CAST(N'2019-02-16T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Ratnamani Metals & Tubes Ltd', N'West Bengal', CAST(N'2019-09-07T00:00:00' AS SmallDateTime), CAST(N'2019-06-16T00:00:00' AS SmallDateTime), 40, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (47, N'PROJ00045', N'Barauni Guwahati Pipeline Project (BGPL)', N'Barpeta -Ratnamani', N'Mecon Ltd.', CAST(N'2019-04-01T00:00:00' AS SmallDateTime), CAST(N'2021-01-04T00:00:00' AS SmallDateTime), N'GAIL', N'Ratnamani Metals & Tubes Ltd', N'Assam', CAST(N'2019-08-18T00:00:00' AS SmallDateTime), CAST(N'2019-06-22T00:00:00' AS SmallDateTime), 42, N'0')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (48, N'PROJ00046', N'Barauni Guwahati Pipeline Project (BGPL)', N'Cooch Behar-Man', N'Mecon Ltd', CAST(N'2019-03-17T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'MAN Industries Ltd.', N'West Bengal', CAST(N'2019-09-18T00:00:00' AS SmallDateTime), CAST(N'2019-06-29T00:00:00' AS SmallDateTime), 43, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (49, N'PROJ00047', N'Haldia Barauni Crude Oil Pipeline Project', N'Bolpur ', N'No', CAST(N'2019-07-18T00:00:00' AS SmallDateTime), NULL, N'IOCL', N'Welspun Corp Ltd.', N'West Bengal', CAST(N'2019-10-03T00:00:00' AS SmallDateTime), CAST(N'2020-02-16T00:00:00' AS SmallDateTime), 44, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (50, N'PROJ00048', N'Haldia Barauni Crude Oil Pipeline Project, ', N'Sarath ', N'IOCL', CAST(N'2019-07-29T00:00:00' AS SmallDateTime), CAST(N'2021-01-31T00:00:00' AS SmallDateTime), N'IOCL', N'Surya Roshni Limited', N'Jharkhand', CAST(N'2019-09-17T00:00:00' AS SmallDateTime), CAST(N'2020-02-28T00:00:00' AS SmallDateTime), 45, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (51, N'PROJ00049', N'ETBPNMTPL', N'Kolar ', N'IOCL', CAST(N'2019-08-05T00:00:00' AS SmallDateTime), NULL, N'IOCL', N'Welspun Corp Ltd.', N'Karnataka', CAST(N'2019-12-26T00:00:00' AS SmallDateTime), CAST(N'2020-06-21T00:00:00' AS SmallDateTime), 46, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (52, N'PROJ00050', N'ETBPNMTPL', N'Koppur ', N'IOCL', CAST(N'2019-10-09T00:00:00' AS SmallDateTime), NULL, N'IOCL', N'MAN Industries Ltd.', N'Tamilnadu', CAST(N'2019-11-02T00:00:00' AS SmallDateTime), CAST(N'2020-07-02T00:00:00' AS SmallDateTime), 47, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (53, N'PROJ00051', N'Dobhi-Durgapur-Haldia-Pipeline', N'Mogra ', N'Engineers India Ltd. (EIL)', CAST(N'2019-10-05T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Welspun Corp Ltd.', N'West Bengal', NULL, CAST(N'2020-02-09T00:00:00' AS SmallDateTime), 48, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (54, N'PROJ00052', N'Hassan-Cherlapally-LPG-Pipeline-Project', N'Mathighatta ', N'Worley Persons', CAST(N'2020-05-19T00:00:00' AS SmallDateTime), NULL, N'HPCL', N'Welspun Corp Ltd.', N'Karnataka', CAST(N'2020-08-14T00:00:00' AS SmallDateTime), NULL, 49, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (55, N'NA', N'NA', N'Dumpsite Auditor', N'NA', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (31, N'PROJ00029', N'Dhobi-Durgapur Pipe Line Project (DDPL)', N'Purulia - MSL', N'Engineers India Ltd. (EIL)', CAST(N'2018-06-05T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Maharashtra Seamless Ltd.', N'West Bengal', CAST(N'2019-11-18T00:00:00' AS SmallDateTime), CAST(N'2018-11-07T00:00:00' AS SmallDateTime), 26, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (38, N'PROJ00036', N'Vijaywada Dharampuri Pipeline Project', N'Cuddapah ', N'Worley Parsons', CAST(N'2019-01-24T00:00:00' AS SmallDateTime), NULL, N'HPCL', N'Jindal Saw Ltd', N'Andhra Pradesh', CAST(N'2019-09-10T00:00:00' AS SmallDateTime), CAST(N'2019-09-10T00:00:00' AS SmallDateTime), 33, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (39, N'PROJ00037', N'Vijaywada Dharampuri Pipeline Project', N'Kalakada ', N'Worley Parsons', CAST(N'2019-02-04T00:00:00' AS SmallDateTime), NULL, N'HPCL', N'Jindal Saw Ltd', N'Andhra Pradesh', CAST(N'2019-07-29T00:00:00' AS SmallDateTime), CAST(N'2019-11-18T00:00:00' AS SmallDateTime), 34, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (41, N'PROJ00039', N'Vijaywada Dharampuri Pipeline Project', N'Dharampuri ', N'Worley Parsons', CAST(N'2019-02-07T00:00:00' AS SmallDateTime), NULL, N'HPCL', N'Jindal Saw Ltd', N'Tamilnadu', CAST(N'2019-11-26T00:00:00' AS SmallDateTime), CAST(N'2019-09-12T00:00:00' AS SmallDateTime), 36, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (46, N'PROJ00044', N'Barauni Guwahati Pipeline Project (BGPL)', N'Purnia - Ratnamani', N'Mecon Ltd.', CAST(N'2019-04-04T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Ratnamani Metals & Tubes Ltd', N'Bihar', CAST(N'2019-06-23T00:00:00' AS SmallDateTime), CAST(N'2019-08-25T00:00:00' AS SmallDateTime), 41, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (79, N'', N'SAPL', N'Raigada', N'MECON', CAST(N'2021-02-08T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'Welspun Corp Ltd.', N'Odisha', NULL, NULL, 0, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (81, N'', N'North-East-Gas-Grid Pipeline', N'Golaghat-Welspun', N'Mecon Ltd', CAST(N'2021-02-11T00:00:00' AS SmallDateTime), NULL, N'IGGL', N'Welspun Corp. Limited', N'Assam', NULL, NULL, 0, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (57, N'', N'Srikakulum-Angul Pipeline Project ', N'Ganjam', N'Mecon Limited', CAST(N'2020-11-18T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'AM/NS India', N'Odisha', NULL, NULL, 34, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (58, N'', N'Kandla-Gorakhpur-LPG-Pipeline Project', N'Gorakhpur', N'', CAST(N'2020-12-05T00:00:00' AS SmallDateTime), NULL, N'IOCL', N'Surya Roshni Limited', N'U.P', NULL, NULL, 52, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (59, N'', N'Kandla-Gorakhpur-LPG-Pipeline Project', N'Azamgarh-Surya', N'', CAST(N'2020-11-24T00:00:00' AS SmallDateTime), NULL, N'IOCL', N'Surya Roshni Limited', N'U.P', NULL, NULL, 36, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (64, N'', N'Barmer-Palanpur Pipeline Project', N'Barmer', N'MECON', CAST(N'2020-12-12T00:00:00' AS SmallDateTime), NULL, N'HPCL', N'Welspun Corp Ltd.', N'Rajasthan', NULL, NULL, 0, N'1')
    GO
    INSERT [dbo].[tbl_Projects] ([Sno], [Project_Id], [Project_Name], [Location], [PMC], [first_pipe_received_date], [last_pipe_issue_date], [project_owner], [pipe_supplier], [state], [first_pipe_issue_date], [last_pipe_received_date], [serial_no], [status]) VALUES (68, N'', N'MNJPL', N'Kopargoan', N'Mecon', CAST(N'2020-12-18T00:00:00' AS SmallDateTime), NULL, N'GAIL', N'ArcelorMittal Nippon Steel I ltd', N'Maharasthra', NULL, NULL, 39, N'1')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (1, N'Local Conveyance', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (2, N'Tour & Travel Exp', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (3, N'Communication Exp.', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (4, N'Gift & Donation Expenses', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (5, N'Water expenses', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (6, N'Staff welfare & Fooding Exp', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (7, N'Medical Expenses', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (8, N'Printing & Stationery', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (9, N'Guest House Rent', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (10, N'Diesel Exp.', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (11, N'Electricity Expenses', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (12, N'Safety Goods Expenses', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (13, N'Petrol Exp', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (14, N'Crane Maintenance', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (15, N'Vehicle Maintenance', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (16, N'Bank Charges', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (17, N'JCB Expenses', N'D')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (18, N'Sand', N'D')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (19, N'Plastick Sheet', N'D')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (20, N'Civil Work', N'D')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (21, N'Moram / Sand', N'D')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (22, N'Electical Item', N'D')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (23, N'Office Furniture', N'D')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (24, N'Daily Labour', N'D')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (25, N'Daily Labour', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (26, N'Hydra Work', N'M')
    GO
    INSERT [dbo].[tblHeads] ([head_id], [head], [head_type]) VALUES (27, N'Hydra Work', N'D')
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (1, N'New Location')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (2, N'Kanpur')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (3, N'Lucknow')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (4, N'haydr.pamant')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (5, N'Kopargaon')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (6, N'North Est')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (10, N'Cooch Behar man')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (11, N'Mujafarpur')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (12, N'Manikagoda-Khurda')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (16, N'Biswanath')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (17, N'Delhi')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (18, N'Delhi')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (24, N'Delhi H O')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (25, N'Golaghat')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (26, N'Golaghat')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (27, N'Bhuvneshwar')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (74, N'ddddd')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (75, N'Moradabad')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (77, N'mm')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (78, N'dfdfdf')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (62, N'Manikagoda-Khurda')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (66, N'Modinagar')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (67, N'Goa')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (80, N'Mumbai')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (83, N'Sikandra jamui')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (86, N'Barpeta')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (71, N'Amritsar')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (87, N'Jalor')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (89, N'Cgd BHAGALPUR')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (91, N'Gurgram')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (92, N'Sampatchak')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (96, N'jargawan')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (100, N'Koderama')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (108, N'fgfgfg')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (109, N'bn')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (111, N'hhhhh')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (115, N'string')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (116, N'Madhepura cgd ')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (117, N'Gaurav')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (122, N'dehradun')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (127, N'Sambalpur')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (129, N'Pipe unloading  koderama ')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (130, N'Karjan')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (7, N'Jajpur -Msl - Bhubaneswar')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (73, N'Betalbatim')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (9, N'Semra Chandauli')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (13, N'Mujafarpur')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (14, N'Pali')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (15, N'Pali')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (19, N'Barmer')
    GO
    INSERT [dbo].[tblOtherLocation] ([other_location_id], [location]) VALUES (20, N'Dharampuri')

    mgebhard

    You need to come to terms with the fact that your SQL script is poorly designed. 

    I do agree, I can not re-structure the current database design and columns as the current project is running on this. (it was designed when I was not associated with this)

    This is basically a needed requirement for now, So I don't have any why to do it like I am willing to. There is no ther way for me.

    Friday, May 7, 2021 11:50 AM
  • User475983607 posted

    demoninside9

    Still Same result

    Sorry, you must remove the Id column as well.  Come on man, learn basic SQL.  The community has provided links to GROUP BY reference documentation above.  Read the documentation and learn the basic concepts.  Id has the same logial problem as location_id,  the GROUP BY cannot GROUP the IDs because the ID values are not the same in each record.   

    Here's an updated version without Id.  I still cannot verify the code because you did not supply the function, employee table is missing, and the sample data is incomplete.   The JOINs do not return a result set.  

    Declare @diesel_imprest INT;
    Declare @diesel_expenditure INT;
    
    SET @diesel_imprest = dbo.Total_Diesel_Imprest(11, 04, 2021);
    SET @diesel_expenditure = dbo.Total_Diesel_Amount(11, 04, 2021)
    
    SELECT 
        t.imp_id, 
        t.Name,
        t.Location,
        t.expenditure, 
        t.reco_amount, 
        t.approved_amount, 
        t.audit_amount, 
        t.paid_amount, 
        t.particular_id, 
        t.particular
    FROM (
    SELECT   TEI.imp_id, TE.Name
     AS Name,
           CASE
               WHEN TEI.other_location <= 0
                    OR TEI.other_location IS NULL
               THEN tbl_projects.location
               ELSE CASE
                        WHEN tblOtherLocation.location IS NULL
                        THEN tbl_projects.location
                        ELSE tblOtherLocation.location
                    END
           END AS Location,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN @diesel_expenditure
               ELSE 0
           END AS expenditure, 
           0 AS reco_amount, 
           0 AS approved_amount, 
           0 AS audit_amount,
           CASE
               WHEN ISNULL(imprest_head, 0) = 10
               THEN @diesel_imprest
               ELSE imp_amount_approved_by_finance
           END AS paid_amount,
    
           ISNULL(imprest_head, 0) AS particular_id, 
    
           TH.head AS particular
    FROM tbl_emp_imprest TEI
         JOIN tblHeads TH ON TH.head_id = TEI.imprest_head
         JOIN tbl_Employee TE ON TE.Sno = TEI.imp_id
         LEFT JOIN tblOtherLocation ON other_location_id = TEI.other_location
         LEFT JOIN tbl_projects ON tbl_projects.sno = TEI.imp_emp_location
    WHERE TEI.imp_id = 11
          AND TEI.imp_amount_approved_by_finance > 0
          AND TEI.expenditure_submit = 0
          AND DATEPART(year, TEI.imp_fin_appr_date) = 2021
          AND DATEPART(month, TEI.imp_fin_appr_date) = 04
    ) AS t 
    GROUP BY     
        t.imp_id, 
        t.Name,
        t.Location,
        t.expenditure, 
        t.reco_amount, 
        t.approved_amount, 
        t.audit_amount, 
        t.paid_amount, 
        t.particular_id, 
        t.particular

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 7, 2021 1:35 PM