The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
30 views

Order By with duration strings having time units

I have a SQLite database with a table "Rate" who has a column "timeToMaturity". This column contains strings such as : 7Months 26Days 3Years I'd like to order a query results by timeToMaturity ...
1
vote
1answer
41 views

Intervals query of huge data

My question is more or less theoretical - what is the best approch to get query data by intervals. The situation I have a system that manage counters (thousands of counters - counts consumption of ...
0
votes
1answer
45 views

Database design: handling time

I am developing a weekly timetable which ideally would allow teachers pick what subjects they teach. While most of this is fairly straightforward, from a conceptual point of view I am unsure how to ...
3
votes
1answer
25 views

MySQL intersection on one table with time type

I've a table with 4 columns: id (int), name (varchar), timefrom (time), timeuntil (time) Now I would like to have all combinations where they have an intersection on the timefrom to timeuntil. My ...
-2
votes
1answer
23 views

Get currentmilliseconds in postgres

I'm working on timestamp/datetime in my application. I'm using postgres db. What is the way to get current milliseconds (something like 1412706599000) in postgres?
0
votes
1answer
29 views

Records in a table unique period

I have the following table: +--+---------+-------+--------------+--------------+ |ID|HEADER_ID|VERSION|FROM_DATE_TIME| TO_DATE_TIME| +--+---------+-------+--------------+--------------+ | 1| ...
0
votes
0answers
26 views

what model should i use for store detections time series in mongodb?

i have cloud site with many hosts and virtual machines inside of it. I receive from some software many different metrics values regarding vms usage (cpu load,free ram,energy consumption and so on). ...
1
vote
1answer
219 views

Select statement for selecting every week's log record

Here is a simplified version of the table in question: +------------------------------------------------------+ | DatabaseName | LogRecordNumber | LogTimestamp | ...
1
vote
1answer
53 views

Getting Time Duration

I have a table like below: I want to get time duration for each record which SPEED is greater than 100. I written a function for that, it’s working fine , but my problem was i have millions of ...
0
votes
0answers
86 views

Convert J1950 Date to Gregorian Date using a MySQL Query

I have a database table with a column named "time." The cells in the "time" column each contain a timestamp entry which was inserted in J1950 time format. I would like to convert the J1950 time to a ...
0
votes
1answer
154 views

12 hour format time in SQL datatype

I can convert time datatype to 12 hour format using convert etc. But is there any option to save the time in 12 hour format in SQL tables using any settings or property or any other methods?
0
votes
0answers
69 views

Are bitemporal tables convenient, compared to valid-time and transaction-time tables separately?

I am trying to collect information about temporal databases. I know it is not a modern technology, but I saw that many people who work with databases don't ever know how temporal approach works (I ...
3
votes
2answers
561 views

Which of the following pieces of SQL is most efficient

I need to add the date part of GetDate() to the time part of a stored DateTime. Naively I thought I could do the following: declare @testTime DateTime = '2013-04-23 13:55:06' select cast(getdate() ...
2
votes
3answers
1k views

Can I use PHP function strtotime() in SQL queries?

I have this table, and I need to use a PHP function in the query. id time lastTime 1 08:02 2 08:04 3 08:30 I am using this query with the strtotime(), and it's not working: ...
1
vote
2answers
67 views

Time elapsed Calculation

I need to calculated time elapsed for each user to perform his part in a transaction. The sequence is: 0 -1 - B2 or 0-B3 The table looks like the following: ...
2
votes
2answers
357 views

Select different time

I looked on the internet and I found your post on the stackexchange. I will try to explain in more detail what we really need I do not know well to write English It is a system for airporttaxi id ...
1
vote
6answers
3k views

Efficiently storing irregular/repeating intervals (think calendar/events)

I am developing a service that relies on users being able to recieve messages that they themselves choose. These messages need to be stored somewhere before they are send for processing. Right now ...
2
votes
1answer
166 views

Risk of changing clocktime on MySQL server host

I have a MySQL server host that have a clock that is about 75 minutes wrong. Is there any risk in changing the hosts clock while MySQL is running? Update: Obviously NOW() and other functions ...
2
votes
2answers
872 views

How to SELECT rows with time duration stored in varchar column?

There is a column in table defined like this : duration varchar(10) It has value for duration of a MP3 file stored in it like : 52:19 (Minutes : Seconds) How can I create a SQL query, for ...
0
votes
1answer
553 views

Can we set LOCK_TIMEOUT instance- or database-wide?

It is possible to change the SQL Server's default (which is -1 or indefinite period of time) LOCK_TIMEOUT value session-wide. Is it possible to set LOCK_TIMEOUT default value server-, instance- ...
14
votes
3answers
16k views

How to combine date and time to datetime2 in SQL Server?

Given the following components DECLARE @D DATE = '2013-10-13' DECLARE @T TIME(7) = '23:59:59.9999999' What is the best way of combining them to produce a DATETIME2(7) result with value '2013-10-13 ...