Forum Replies Created

Viewing 15 posts - 601 through 615 (of 2,452 total)

  • RE: Calculate Working days based on Holidaymaster table

    GA_SQL (6/21/2016)


    i almost done ..created another SP called effreportday to calculate efficencyreport which will give the daywise efficiency of the employee like this empidd1 d2d3d4d5d6d7d8d9d10d11d12d13d14d15d16d17d18d19d20d21d22d23d24d25d26d27d28d29d30d31WorkingDaysTotalEfficiencyAverage

    509700000000000000000008890000000000001780

    i want...

  • RE: Calculate Working days based on Holidaymaster table

    USE [tempdb]

    CREATE TABLE [dbo].[#Holidaymaster](

    [Holiday_ID] [int] NULL,

    [Holiday] [varchar](50) NULL,

    [Date1] [datetime] NULL

    ) ON [PRIMARY]

    GO

    INSERT [dbo].[#Holidaymaster] ([Holiday_ID], [Holiday], [Date1]) VALUES (1, N'New Year', '2016-01-01' )

    INSERT [dbo].[#Holidaymaster] ([Holiday_ID], [Holiday], [Date1]) VALUES (2, N'Pongal', '2016-01-16'...

  • RE: Calculate Working days based on Holidaymaster table

    ganapathy.arvindan (6/20/2016)


    I Tried with union as well, but while adding the column name count(hdL) it shows error..Please reply

    show what code you tried (I cant see your screen :-)) and...

  • RE: Calculate Working days based on Holidaymaster table

    ganapathy.arvindan (6/20/2016)


    Same way i also did, but including has column in this pivot is not working..WITH yourcalendar1 as (

    SELECT DATEADD(dd, rn - 1, @sd) thedate, 'D' + CAST ((rn )...

  • RE: Calculate Working days based on Holidaymaster table

    as a start

    SELECT COUNT(hdL)

    FROM #temp

    WHERE ...

  • RE: Closest less date

    rb76 (6/18/2016)


    Hi,

    thanks for the answers. But I think I didn't explain my question not good enough.

    The table contains about 30000 lines. So I think I cannot make my query with...

  • RE: Updating based on past records

    ByronOne (6/17/2016)


    Hi everyone

    I have a table in SQL called dbo.ACTIVITIES which records the time it takes to complete a certain activity.

    The time taken to perform the activity is recorded in...

  • RE: Calculate Working days based on Holidaymaster table

    did you manage to solve this successfully ?

  • RE: help with "cast"

    rightontarget (6/16/2016)


    Not really, please explain

    suggest you research "MS SQL Integer division"

    heres some code to play around with

    CREATE TABLE #mytable(

    cnt INTEGER NOT NULL

    ,total...

  • RE: Help with Pivot

    futhre to my previous post.....care to fully explain what you mean by this:

    OUPUT:

    lngOrderID, lngBillingStepID, lngBillingStepID, lngSubBillingStepID =1, lngSubBillingStepID =2, lngSubBillingStepID=3

    I would like the lngSubBillingStepID to show their orginal value of...

  • RE: help with "cast"

    maybe.....

    SELECT id, cnt, total, cnt*1.0/total

    FROM <yourtable>

  • RE: help with "cast"

    what are the datatypes for columns "cnt" and "total"?

    what are you expected results?

  • RE: Is there a way to extract certain parts of data

    just a word to the wise...and I am sure you already know this....but before doing any calculations be sure you undestand what UOM (unit of measure) you are dealing with...

  • RE: Help with Pivot

    David92595 (6/15/2016)


    Sorry, my spacing\formatting got removed...hope this is a little better.

    CREATE TABLE [dbo].[tblOrderBillingSteps](

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

    [lngOrderID] [int] NULL,

    [lngBillingStepID] [int] NULL,

    [lngSubBillingStepID] [int] NULL,

    CONSTRAINT [PK_OrderBillingSteps] PRIMARY KEY CLUSTERED

    INSERT INTO...

  • RE: Help with Pivot

    CREATE TABLE #ATableLike(

    ID INTEGER NOT NULL

    ,TS INTEGER NOT...

Viewing 15 posts - 601 through 615 (of 2,452 total)