On 01/26/2012 04:00 AM, John Tuliao wrote:
I seem to have a problem with a specific query:
The inside query seems to work on it's own:
select prefix
from john_prefix
where strpos(jpt_test.number,john_prefix.prefix) = '1'
order by char_length(john_prefix.prefix) desc limit 1
but when I execute
I seem to have a problem with a specific query:
The inside query seems to work on it's own:
select prefix
from john_prefix
where strpos(jpt_test.number,john_prefix.prefix) = '1'
order by char_length(john_prefix.prefix) desc limit 1
but when I
Hi,
I can use some help with the following query please.
Given a couple of tables I want to do a JOIN like operation. Except that one
of the columns might be null.
create table T1 ( id serial, name varchar(20) );
create table T2 ( id serial, name varchar(20) );
create table T1_T2 ( id serial,
On Thu, 22 May 2008, Medi Montaseri wrote:
Hi,
I can use some help with the following query please.
Given a couple of tables I want to do a JOIN like operation. Except that one
of the columns might be null.
create table T1 ( id serial, name varchar(20) );
create table T2 ( id serial, name
Thanks Stephan,
My real DDL include a forign key reference to T2.id and since I am ok with
NULL value then the left outer join indeed have solved the problem.
Thanks again
Medi
On Thu, May 22, 2008 at 2:50 PM, Stephan Szabo [EMAIL PROTECTED]
wrote:
On Thu, 22 May 2008, Medi Montaseri wrote:
Dear Shane,
Thanks for the reply and your observation about the
word i have used. It is idle odometer reading.
The actual Scenario is that the vehicle is taken by
the driver.
When he comes the next day. He is suppose to login
again.
Here i am trying to find out how much distance has the
Hi All,
I have a table called
vehicle_duty_cycle_summary
vehicle_master_id | starting_odometer |
ending_odometer | login_time |
logout_time
---+---+-++
4 |
Trilok Kumar wrote:
Hi All,
I have a table called
vehicle_duty_cycle_summary
vehicle_master_id | starting_odometer |
ending_odometer | login_time |
logout_time
On Sep 21, 12:09 am, [EMAIL PROTECTED] wrote:
Write the query (or queries if necessary) needed to count the number
of employees in each employee's department who are paid more than
their manager.
SELECT e.dept, COALESCE (SUM (1), 0) AS n
FROM employees e JOIN employees m
ON
Hi
Whilst I'm not new to SQL I am reasonably new to Postgres and as such I have
a question on the following query:
SELECT
tbl1.TermTypeID,
tbl1.ParentID,
tbl1.KeywordID,
tbl1.Term,
tbl2.KeywordID
FROM
Terms As tbl1 LEFT JOIN
SearchStore As tbl2 ON tbl1.KeywordID =
Am Donnerstag, 30. Juni 2005 11:27 schrieb Nick Stone:
SELECT
tbl1.TermTypeID,
tbl1.ParentID,
tbl1.KeywordID,
tbl1.Term,
tbl2.KeywordID
FROM
Terms As tbl1 LEFT JOIN
SearchStore As tbl2 ON tbl1.KeywordID = tbl2.KeywordID
WHERE
(tbl1.TermTypeID = 200) AND
Nick Stone wrote:
Hi
Whilst I'm not new to SQL I am reasonably new to Postgres and as such I have
a question on the following query:
FROM
Terms As tbl1 LEFT JOIN
SearchStore As tbl2 ON tbl1.KeywordID = tbl2.KeywordID AND
tbl2.StockID = 1
Why does the above query work fine and the
I do some tests with your first query and it seems to works.
Thanks a lot for your answer, i will post the final thought later
Thanks again
bye
Franco Bruno Borghesi wrote:
If you have a row every 15 seconds, the answer is quite easy:
SELECT
A1.date
FROM
activity A1
LEFT JOIN activity A2 ON
Hi ,
I have table that represent a switch activity like this :
| date| state |
| 2005-04-20 17:00:00 | 0 |
| 2005-04-20 17:00:15 | 0 |
| 2005-04-20 17:00:30 | 1 |
| 2005-04-20 17:00:45 | 1 |
| 2005-04-20 17:01:00 | 1 |
| 2005-04-20
If you have a row every 15 seconds, the answer is quite easy:
SELECT
A1.date
FROM
activity A1
LEFT JOIN activity A2 ON (A2.date=A1.date-'15 secs'::interval)
WHERE
A1.stateA2.state OR A2.state IS NULL
ORDER BY 1
Now if you don't have a row every 15 seconds, the answer is a bit more
15 matches
Mail list logo