Forum Replies Created

Viewing 15 posts - 1 through 15 (of 95 total)

  • RE: problem with group by

    hello all.

    I need to this query immediately.please guide me.

  • RE: problem with group by

    True result is result of query without cte.EntityCode but I need to have cte.EntityCode (m.EntityCode ,v.EntityCode ) essentially.

    Please help me to correct this query with EntityCode and true result.

    thanks

  • RE: problem with group by

    false result:

    1,276,sara,john,11/16/2015 0:00,427,11/18/2015 0:00,14:00:00:000,17:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    2,276,sara,john,11/16/2015 0:00,427,11/19/2015 0:00,08:00:00:000,12:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    3,276,sara,john,11/16/2015 0:00,427,11/21/2015 0:00,08:00:00:000,13:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    4,275,sara,john,11/16/2015 0:00,427,11/18/2015 0:00,14:00:00:000,17:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    5,275,sara,john,11/16/2015 0:00,427,11/19/2015 0:00,08:00:00:000,12:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    6,275,sara,john,11/16/2015 0:00,427,11/21/2015 0:00,08:00:00:000,13:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    7,274,sara,john,11/16/2015 0:00,427,11/18/2015 0:00,14:00:00:000,17:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    8,274,sara,john,11/16/2015 0:00,427,11/19/2015 0:00,08:00:00:000,12:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    9,274,sara,john,11/16/2015 0:00,427,11/21/2015 0:00,08:00:00:000,13:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    10,229,sara,john,11/5/2015 0:00,427,11/4/2015 0:00,09:55:00:000,17:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    true result:

    1,sara,john,11/5/2015 0:00,427,11/4/2015 0:00,09:55:00:000,17:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    2,sara,john,11/16/2015 0:00,427,11/18/2015 0:00,14:00:00:000,17:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    3,sara,john,11/16/2015 0:00,427,11/19/2015 0:00,08:00:00:000,12:00:00:000,NULL,NULL,NULL,NULL,NULL,NULL,1,E:\Farzin\Upload\PersonnelSignature\1393\8\20\Untitled-1[17-1-59-695],E:\Farzin\Upload\PersonnelSignature\1394\1\23\image0000001A[8-49-7-711]

    4,sara,john,11/16/2015 0:00,427,11/21/2015...

  • RE: IDENTITY_INSERT Problem

    My procedure is:

    create procedure SyncUsersAndRoles (@Type int)

    as

    BEGIN

    declare @DepartmentID int,@OrganizationRoleID int

    SELECT @DepartmentID=[Department_ID] FROM [Departments] where [IsReference]=1

    select Top 1 @OrganizationRoleID=OrganizationRole_ID from OrganizationRoles

    if @Type=1----SyncUsers

    Begin

    SET IDENTITY_INSERT...

  • RE: select string between two ',' symbols

    hello anthony.green.

    In your example,I need this result:159602

    in fact I always need second part from last:If I have this:14,18,110,120,300 I need this:120

  • RE: need a query

    thank you so much dear J Livingston SQL

    🙂

  • RE: need a query

    sorry dear J Livingston SQL

    in my previous post,ali ahmadi has 2 days and 1 hours vacation.now I want to have this result:17:00:00

    also he has 02:00:00 mission.now I want to...

  • RE: need a query

    hello J Livingston SQL

    I need to get duration between starttime and endtime and then sum of this duration.

    I mean I need to have sum of Vacation time and Mission...

  • RE: need a query

    thank you so much Dear J Livingston SQL.This is my requiment.

  • RE: need a query

    hello J Livingston SQL

    thank you for your reply.

    I need this output:

    Name,RequestDate,HourlyVacationDate,HourlyVacationStartTime,HourlyVacationEndTime,DailyStartDate,DailyEndDate,StartDate,EndDate,StartTime,EndTime

    AliAhmadi,'2015-10-03',null,null,null,'2015-10-04','2015-10-05',null,null,null,null

    AliAhmadi,'2015-10-10',null,null,null,null,null,null,'2015-10-10','2015-10-10',46800,50400

    AliAhmadi,'2015-10-15',null,null,null,null,null,null,'2015-10-15','2015-10-15',46800,50400

    AliAhmadi,'2015-10-21','2015-10-20',46800,50400,null,null,null,null,null,null

    AmirEbadi,'2015-10-13',null,null,null,null,null,'2015-10-13','2015-10-13',46800,50400

    AmirEbadi,'2015-10-01',null,null,null,'2015-10-02','2015-10-03',null,null,null,null

    AmirEbadi,'2015-10-11','2015-10-10',28800,79200,null,null,null,null,null,null

  • RE: need a query

    hello all.

    please help me about my query.

  • RE: need a query

    hello GilaMonster

    I have a Filed in Mission and Vacation which is RequestDate with smalltime type.I want to filter on this field.

    CREATE TABLE [dbo].[Mission](

    [MissionID] [int] IDENTITY(1,1) NOT NULL,

    [Applicant_Id] [int] NULL,

    [StartDate]...

  • RE: need a query

    Also, which of the dates in the Mission table are used to check the date range? If there's a mission with a start date of '2015-10-02' and an end date...

  • RE: need a query

    Dear GilaMonster I only take an example. please You Consider this data and guide me for my result not exactly my data.

    thank you

  • RE: need a query

    ok You please consider Ali Ahmadi for example.

Viewing 15 posts - 1 through 15 (of 95 total)