Hi,

I need to join two table according to range of date. 

Fist table is error log table second is users{operators} login. 
I need to show complete table with all error with actual user id.

CREATE TABLE [login] (
[id] iNTEGER  NOT NULL,
[start] TIMESTAMP DEFAULT (datetime('now','localtime')) NOT NULL,
[ende] TIMESTAMP  NULL,
FOREIGN KEY(id) REFERENCES operators(id)
)

CREATE TABLE [errorapi] (
[start] TIMESTAMP DEFAULT (datetime('now','localtime')) NOT NULL,
[konec] TIMESTAMP,
[describe] TEXT  NOT NULL,
[track] TEXT,
[account] TEXT,
[priority] INTEGER
)

select errorapi.*,login.* from errorapi JOIN login on (errorapi.start
between login.start and login.ende)

This command show only one end record. It is possible to use JOINS? 

I don't want to add operator_id as columb, because I have more tables when I
want to show this.

Lot of thanks, 

Pavel Samek

-- 
View this message in context: 
http://old.nabble.com/JOIN-on-between-tp33124032p33124032.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to