Forum Replies Created

Viewing 15 posts - 46 through 60 (of 68 total)

  • RE: Hourly

    Yes. Let say the time is 0830.

    Would like to get 0700 to 0800

  • RE: Hourly

    How to overcome the end date issue?

    When I try to run it appear together with the minute.

    Example current time 08:49:44.6730000

    StartDate 07:00:00.0000000

    EndDate 08:49:44.6730000

    How to make it

    StartDate 07:00:00.0000000

    EndDate 08:00:00.0000000

    Is it possible?

  • RE: Hourly

    serg-52 (9/23/2014)


    If rounded interval is needed

    SELECT

    timeStart =

    DATEADD(MINUTE

    ,-DATEPART(MINUTE,getdate())

    ,DATEADD(SECOND

    ,-DATEPART(SECOND,getdate())

    , DATEADD(MS,

    -DATEPART(ms,getdate())

    ,getdate())))

    ,timeEnd =

    DATEADD(MINUTE

    ,-DATEPART(MINUTE,getdate()) + 60

    ,DATEADD(SECOND

    ,-DATEPART(SECOND,getdate())

    , DATEADD(MS,

    -DATEPART(ms,getdate()) -...

  • RE: Hourly

    I get this error:

    The data types time and datetime are incompatible in the greater than or equal to operator.

  • RE: Hourly

    how to get 1 hour behind?

    example current timing 11:28, get 10:00 to 11:00

  • RE: Substring

    May I know what does the 7 means?

    SUBSTRING(SD.ColumnA,1,CHARINDEX(' ',SD.ColumnA,7) -1 ) AS FIXED_PART

  • RE: charindex patindex substring

    Is it because i need to select only Top 1?

  • RE: charindex patindex substring

    I get this error when i replace set the select statement.

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >,...

  • RE: charindex patindex substring

    is there any shorter way like using substring method instead of set it?

  • RE: charindex patindex substring

    How to define to make it flexible on this part?

    set @InputString = '7/5/2014 0:0:0 AUS UK 7/5/2014 18:21:0 7/5/2014 20:45:0 7/5/2014 19:10:0 7/5/2014 23:30:0'

    Because I have a long list of...

  • RE: charindex patindex substring

    Originaly the data will be like this:

    select top 1 batchRecord from tableA

    batchRecord

    7/5/2014 0:0:0 DEPARTURE AUS UK 7/5/2014 18:21:0 7/5/2014 20:45:0 ARRIVAL 7/5/2014 19:10:0 7/5/2014 23:30:0

  • RE: charindex patindex substring

    i have a long list of data..will like to add in additional departure and arrival into the script..

    7/5/2014 0:0:0 DEPARTURE AUS UK 7/5/2014 18:21:0 7/5/2014 20:45:0 ARRIVAL 7/5/2014 19:10:0 7/5/2014...

  • RE: charindex patindex substring

    7/5/2014 0:0:0 DEPARTURE AUS UK 7/5/2014 18:21:0 7/5/2014 20:45:0 ARRIVAL 7/5/2014 19:10:0 7/5/2014 23:30:0

    that DEPARTURE and ARRIVAL

  • RE: SQL job failed

    I hit that error on after trying on steps number:

    6. In REGEDIT, go to File >> Import, and select your edited .reg file

    That's the error I get.

  • RE: SQL job failed

    Cannot import. Error accessing the registry.

Viewing 15 posts - 46 through 60 (of 68 total)