SQL Question

Поиск
Список
Период
Сортировка
Искать

SQL Question

От:
Yogesh Sharma <ysharma@catprosystems.com>
Дата:
Hi,

Two tables

Table_Master
id    bigint
t1    timestamp with time zone
t2    timestamp with time zone
PK is id,t1

Table_Data
ts    timestamp with time zone
data    text
pk is ts

like to get all rows from table_data where ts is between table_master.t1 
and table_master.t2 for a given id.

Thanks

Re: SQL Question

От:
Emil Obermayr <nobs@nobswolf.info>
Дата:
Am Donnerstag, 18. Dezember 2008 schrieb Yogesh Sharma:

> like to get all rows from table_data where ts is between table_master.t1
> and table_master.t2 for a given id.

have you tried "between" as join condition? can you explain in more detail 
what you have tried already and where the problem is?

http://www.postgresql.org/docs/current/static/functions-comparison.html
FAQ