Not even Microsoft Excel has a dedicated datetime/timestamp type. It is just a
presentation layer attribute of a floating point value. Also, you get to choose
the way you want calendar data to be stored. So why?
-Ursprüngliche Nachricht-
Von: sqlite-users
On 2018/06/03 1:13 PM, Wout Mertens wrote:
Hi all,
To do paged queries on a query like
SELECT colVal FROM t WHERE b=? LIMIT 10
I keep track of column values and construct a query that will get the next
item in a query by augmenting the query like
SELECT colVal FROM t WHERE b=? AND
The problem not having a DATETIME field is, however, very simple: When
reading a foreign database which stores date values as a number, I
have to guess on how to get back the correct date.
The datatype used is irrelevant w.r.t. this issue. Unless fully
qualified with convention used and
> One problem with having an actual internal date format is how to dump it into
> a text file or to a text interface. You end up turning it into a number or a
> string anyway, so you might was well store it that way.
The problem not having a DATETIME field is, however, very simple: When
Wout Mertens wrote:
> To do paged queries on a query like
>
> SELECT colVal FROM t WHERE b=? LIMIT 10
This does not make sense without an ORDER BY.
> To know how many rows there are in the query, I do
>
> SELECT COUNT(*) FROM t WHERE b=?
>
> Are there any efficiency tricks here?
No.
On 3 Jun 2018, at 9:48am, Thomas Kurz wrote:
> he problem not having a DATETIME field is, however, very simple: When reading
> a foreign database which stores date values as a number, I have to guess on
> how to get back the correct date. People and companies are very creative in
> that
Hi all,
To do paged queries on a query like
SELECT colVal FROM t WHERE b=? LIMIT 10
I keep track of column values and construct a query that will get the next
item in a query by augmenting the query like
SELECT colVal FROM t WHERE b=? AND colVal > ? LIMIT 10
To know how many rows
> SQLite doesn't have a DATE type. You can store dates in a SQLite
> database as text, or integers or floating point numbers (e.g. "20180602",
> a number of days, a number of seconds). But when you ask for a value,
> that's what you'll get back. Any interpretation of that value as a
> date is
Hi, All,
After executing the following:
int res = sqlite3_prepare_v2( ... stmt );
while( ; ; )
{
res = sqlite3_step( stmt );
if( res == SQLITE_ROW )
{
// process the record
}
else if( res == SQLITE_DONE )
break;
else
{
// error procressing
}
9 matches
Mail list logo