Forum Replies Created

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

  • RE: Sql query row value if exists

    Dear Phil, It works,

    Select twenty, Route_Name = iif(twenty = '220', 'Antony',Null), Route_Name = iif(twenty = '20', 'Bony',null)
    FROM [d].[dbo].[t4]
    But i want to show it one line(Virtual Column)...

  • RE: Convert horizontal table to vertical in Sql

    Hi Phil its dynamic.

  • RE: SQL insert auto insert with stop value

    Hello Steve,

    Seems yours code is ok .

    SELECT *
    FROM (
    SELECT ROW_NUMBER()
    OVER(PARTITION BY name
    ORDER BY name DESC) AS StRank, *
    FROM [d].[dbo].[t4]) n

  • RE: SQL insert auto insert with stop value

    Hi sgmunson...thanks for your feedback. ..is it possible to share any codings which is PARTITION BY OVER  clause would be great...

  • RE: SQL insert auto insert with stop value

    experts, Thanks for your feedback.
    Actually, I am trying to develop DML for cashier with drivers shipment cash entry. Each day driver might have multiple shipments i mean delivery loads....

  • RE: Query with multiple conditions (SQL 2016)

    Luis Cazares - Thursday, January 26, 2017 7:02 AM

    ShawnBryan - Thursday, January 26, 2017 6:59 AM

    January 26, 2017 at 7:36 am

    #1925058

  • RE: Query with multiple conditions (SQL 2016)

    Luis Thanks It worked..

  • RE: Query with multiple conditions (SQL 2016)

    drew.allen - Wednesday, January 25, 2017 3:47 PM

    When posting sample data and expected results, they must MATCH.  Your sample data contains two...

  • RE: Query with multiple conditions (SQL 2016)

    Luis Cazares - Wednesday, January 25, 2017 2:10 PM

    Seems pretty clear:
    You cannot use an aggregate in an expression used for the...

  • RE: Exclude the negative value in OT calculation

    Hello sgmunson,

    Thanks for trying to come out the quality answer. And thanks to chris who is continuously replied my query's without any hesitation.

    I had 4 different requirement for which i...

  • RE: Total Sum is not Calculating in event of Multiple Clock events

    Hello Sgmugson,

    Thanks for your effort to provide quality answers where no matter how my question is good or bad:) .

    No remote workers taking part in this calculation. Secondly i had...

  • RE: Total by Group.

    Hello Chris,

    Thanks i am able see the result . thinking & applied same your logic,

    Added in select (cast(government_num as decimal(10,0))) as dutyhours and further added in subquery cast(sum(dutyhours) as int)...

  • RE: Total by Group.

    hi here OT is computed from dutyhours vs hoursworked.

    i am not looking t OT instead my issue is with dutyhours incorrect computation.

    Checking again to see where went wrong with what,

  • RE: Total by Group.

    Hi,

    i am using following query to bring the following result,

    ;WITH Prep AS

    (

    SELECT

    preffered_name as Department ,email_address1 as subdepartment,friday,saturday,government_num as dutyhours,ci.person_num, ci.event_name, CAST(DATEADD(hour,1,dbo.UtcToLocal(ci.creation_date)) AS DATE) AS event_date,DATEname(weekday,dbo.UtcToLocal(co.creation_date)) AS Day,

    CAST(dbo.UtcToLocal(ci.creation_date) AS...

  • RE: Total by Group.

    here you go with DDL & DML,

    DDL

    CREATE TABLE action (

    action_id int NOT NULL,

    creation_date datetime,

    PRIMARY KEY (action_id)

    );

    CREATE TABLE action_history (

    action_id int NOT NULL,

    person_id nvarchar(15),

    person_num nvarchar(40),

    ...

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