Forum Replies Created

Viewing 15 posts - 6,706 through 6,720 (of 26,490 total)

  • RE: Convert Bigint time to datetime

    PSB (4/17/2014)


    SELECT DATEADD(hh,-5,dateadd(s, convert(bigint, 1397750400000) / 1000, convert(datetime, '1-1-1970 00:00:00')))

    worked for me!

    So the BIGINT value was actually milliseconds since midnight 1970-01-01, not minutes. Good to know.

  • RE: Log management in mirroring and replication

    Since mirroring requires using the full recovery model you need to have scheduled periodic transaction log backups running to manage the size of your transaction log file. Without regularly...

  • RE: Transaction Log Backups Question

    defyant_2004 (4/17/2014)


    Thank you. Is the following safe to assume?

    All log files up to the point of the NEW FULL database backup are unusable and could be deleted. Even...

  • RE: Convert Bigint time to datetime

    PSB (4/17/2014)


    select DATEADD(Minute, 1397750400000, '1970-00-01')

    Getting an overflow error .

    Arithmetic overflow error converting expression to data type int.

    Yep, told you that would happen earlier.

    Now, what date and time does 1397750400000...

  • RE: Convert Bigint time to datetime

    gbritton1 (4/17/2014)


    Well, OK. Just do it in a loop, adding portions of bigint that fit into an integer to an accumulating date field.

    Okay, using what for a base? ...

  • RE: Query optimization help

    ScottPletcher (4/17/2014)


    Lynn Pettis (4/17/2014)


    ScottPletcher (4/17/2014)


    Lynn Pettis (4/17/2014)


    ScottPletcher (4/17/2014)


    You need to do further research before you change the existing index to a filtered index, because that index will no longer satisfy...

  • RE: Convert Bigint time to datetime

    Unfortunately, you get an overflow error when trying to convert the BIGINT value provided to an INT value when using DATEADD.

  • RE: Query optimization help

    ScottPletcher (4/17/2014)


    Lynn Pettis (4/17/2014)


    ScottPletcher (4/17/2014)


    You need to do further research before you change the existing index to a filtered index, because that index will no longer satisfy queries originally using...

  • RE: Convert Bigint time to datetime

    Also, what date and time does the value provided equate?

  • RE: Switching from sql 2014 eval version to Enterprise version, fully lisenced

    You could probably do an in place upgrade. You could test that on a test system to be sure it works.

  • RE: Query optimization help

    ScottPletcher (4/17/2014)


    You need to do further research before you change the existing index to a filtered index, because that index will no longer satisfy queries originally using it if you...

  • RE: Object already exists, but can't drop it!

    Try this and let us know the results:

    select

    schema_name(schema_id) As SchemaName,

    name As ObjectName,

    type_desc as ObjectType

    from sys.all_objects where name = 'HighCharacter'

  • RE: Need a logic

    Simplest way to fix this, remove the token 'already' as this appears to exist in all the messages. It doesn't make any sense to me to search for 'already'...

  • RE: Simple view question regarding indexes

    Yes, the queries used to define views will take advantage of the indexes on the underlying tables if they assist in the return of data from those tables.

  • RE: How to convert nvarchar to date data type?

    Well, you provided DDL and sample data, but I'm not quite sure what you expect as output. Please provide expected results based on the sample data you provided.

Viewing 15 posts - 6,706 through 6,720 (of 26,490 total)