Forum Replies Created

Viewing 4 posts - 16 through 19 (of 19 total)

  • RE: sql query

    Hi asranantha,

    you may be get result by using any one of the below query.

    #Query 1

    ;with cte(Location)

    as

    (

    select Location from Test group by Location having COUNT(*)>3

    )

    select * from Test t inner join...

  • RE: get overtime hours

    sugiarttampubolon (4/18/2013)


    i am have a problem to get overtime hours

    the table

    EmployeeNo TimeIn TimeOut BreakHours WorkingHours

    001 06:20 ...

  • RE: adding a prefix to a column in an SQL view

    Hi dallibabs,

    try this query.

    select 'www.john/'+Convert(varchar,productId) as id from Table1

  • RE: Compare date?

    table structure :

    CREATE TABLE [dbo].[Orders](

    [Id] [int] NULL,

    [DateofOrd] [datetime] NULL

    )

    Table data:

    Id DateofOrd

    12013-04-17 13:00:41.847

    22013-04-17 14:00:41.847

    32013-04-17 15:00:41.847

    42013-04-17 15:10:41.847

    52013-04-17 16:10:41.847

    ;WITH ordercte(id,timevalue)as

    (

    select id,ltrim(right(convert(nvarchar(20),DateofOrd,0),8)) as timevalue from orders

    )

    select * from ordercte...

Viewing 4 posts - 16 through 19 (of 19 total)