,
de_id int4 not null,
de_date date not null,
day_limit int4 not null CHECK (day_limit = 0),
primary key (s_id,de_id, de_date),
foreign key (s_id, de_id) references site_user_departments (s_id, de_id)
);
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http
| 8
H|80 | 2013-10-11 | 5 | 3
H|80 | 2013-10-12 | 6 | 2
(7 rows)
goole=#
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your
round this.
Also, the final version will be put onto a WordPress web site which means I
will have to port it to MYSQL which I don't know, so any solution that will
work with both systems would be a great help.
Ta
Gary
stainburn=# \d skills_pages
Table
) deferrable
);
Cheers. I'll look at that. It's actually the second unique index that's the
problem but I'm guessing I can set that index up as deferrable too.
Hopefully it'll work for mysql too.
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql
,
stts_offset+stts_duration from table
order by stts_id, stts_offset desc
Marc Mamin
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
Hi folks,
I need help please.
I have a table of trip section details which includes a trip ID, start time as
an offset, and a duration for that section.
I need to extract the full trip duration by adding the highest offset to it's
duration. I can't simply use sum() on the duation as that
As usual, once I've asked the question, I find the answer myself.
However, it *feels* like there should be a more efficient way. Can anyone
comment or suggest a better method?
timetable= select stts_id, stts_offset+stts_duration as total_duration
timetable- from standard_trip_sections
= q.st_id
join skills k on k.sk_id = q.sk_id
order by st_id, sk_id
I am still at the concept stage for this project so I can change the schema if
required
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
join skills k on k.sk_id = q.sk_id;
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
| ESALES4 |
4197 | WSERV1 |
2731 | LSALESE |
(33 rows)
users=#
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
in multiple rows for each p_id somehow.
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
was wondering, and was looking for suggestions / best
practices on how to do this.
I had first thought of embedding case/when statements in the view but it could
easily become unweildy
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list
, date_2 and date_3. The resulting view needs to
contain date_1, date_2, date_3, date_a and date_b where date_a and date_b are
calculated based on the first three (plus a text field).
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing
rhen date_b=date1 else date_b=date2
etc.
What's the best way to do this?
I know it's a quite open question but I'm interested to hear different
responses
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql
= u.ud_registration;
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
- Original Message -
From: Gary Stainburn gary.stainb...@ringways.co.uk
To: pgsql-sql@postgresql.org
Sent: Wednesday, May 23, 2012 10:27 AM
Subject: [SQL] left outer join only select newest record
Hi folks,
I know I've seen posts like this before but Google isn't helping today
On Wednesday 23 May 2012 10:46:02 Pavel Stehule wrote:
select distinct on (s.s_registration) *
... order by u.ud_id desc
I tried doing this but it complained about the order by.
goole=# select distinct on (s.s_stock_no) s_stock_no, s_regno, s_vin,
s_created, ud_id, ud_handover_date from
://www.postgresql.org/docs/9.0/interactive/sql-select.html
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
' and rm_timestamp =
('2012-03-26'::date + '7 days'::interval);
key
---
25:2012-03-27
25:2012-03-28
25:2012-03-29
25:2012-03-30
(4 rows)
users=#
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
this but can't find a suitable solution. Can anyone help
please.
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
this but can't find a suitable solution. Can anyone help please.
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
and not
facility_levels. Everything in the child table would also exist in
facility_levels. As this is so specific to PostgreSQL and is not hugely
common as a technique, read this as a *possible* solution not a
recommended one.
Hope this helps
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
on a FC9 system using RPM's?
Also, the last time I did a server upgrade (FC4 to the FC9 system) upgrading
apache, PHP and postgresql broke so many things in my applications it was
painful. Can anyone suggest ways I can soak test my systems before upgrading
the live system?
--
Gary Stainburn
live systems?
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
On Thursday 19 January 2012 15:11:46 Gary Stainburn wrote:
I'll be upgrading my live server as soon as possible, but in the meantime
can anyone suggest a way I can do the same thing using Postgresql 8.1
until I can evaluate 8.4 on my live systems?
Sorry, I meant 8.3 as my current version
called in context that cannot accept a set
CONTEXT: PL/pgSQL function date_range line 4 at RETURN NEXT
Is there a way to use the integer only generate_series in 8.3 to generate
dates by typecasting to/from integers?
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http
Sorry for using the list as a scratch-pad for my brain.
select aid, asid,
generate_series(asdate-'1970-01-01'::date,
afdate-'1970-01-01'::date)+'1970-01-01'::date as adate,
acomments
from availability;
Has done the trick.
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http
wdate = tdate LOOP
return next wdate;
wdate:=wdate+1;
end LOOP;
return;
END;
$$
LANGUAGE plpgsql;
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription
anyway.
Gary
On Thursday 19 May 2011 01:09:07 David W Noon wrote:
On Wed, 18 May 2011 20:10:19 +0100, Gary Stainburn wrote about [SQL]
foreign keys and lots of tables:
I have the following tables (individual seat allocation removed to
make it simpler)
Omitting details makes the problem
the bookings table and I don't know how.
To complicate things, when the initial booking is made, bot c_id and c_seat
are NULL. Will this make any difference?
Gary
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql
(u_id)
fl_level int4 not null references facility_levels(16, fl_level)
Firstly, is this possible, and secondly how would I do it?
--
Gary Stainburn
I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your
On Wednesday 05 January 2011 09:53:43 Gary Stainburn wrote:
Now I want to set up a new access level table specific to the itinerary,
along the lines of
u_id int4 not null references users(u_id)
fl_level int4 not null references facility_levels(16, fl_level)
Firstly, is this possible
THEN
RETURN eta;
END IF;
RETURN req_date;
END;
$$ LANGUAGE 'plpgsql';
[r...@stan t-cards]#
--
Gary Stainburn
I.T. Manager
Ringways Garages
http://www.ringways.co.uk
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
On Thursday 30 December 2010 17:47:09 Adrian Klaver wrote:
To follow up I think the OP was looking for ELSEIF not ELSE IF. Changing
the ELSE IF to ELSEIF should fix it.
Thanks guys. That'll teach me to read tutorials more carefully.
--
Gary Stainburn
I.T. Manager
Ringways Garages
http
that has been live for some time but I've
never managed to get to the bottom of why it's much slower than the other
views.
Gary
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed
On Tuesday 21 September 2010 15:11:09 Craig Ringer wrote:
On 09/21/2010 08:25 PM, Gary Stainburn wrote:
Hi folks,I have a view that seems to be very slow compared to similar
views on the same server.
I've had a look at running explain but I don't really understand it.
I've posted
On Tuesday 21 September 2010 15:20:15 Gary Stainburn wrote:
I've posted th explain analyze at
http://www1.ringways.co.uk/explain_analyse.txt
I've marked a line with a sort in that appears to be the bit that's taking
the time. Am I right?
I've had a look at this, and I can't even see why
entry per order.
--
Gary Stainburn
Gary's Haircut 700
Please visit http://www.justgiving.com/Gary-Stainburn/ to help me
raise money for Cancer Research - in return I'll have my head shaved
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription
ON ol.o_id=o.o_id
AND ol.ol_timestamp=max_olt.maxts
;
Cheers Jim,
That worked.
Gary
--
Gary Stainburn
Gary's Haircut 700
Please visit http://www.justgiving.com/Gary-Stainburn/ to help me
raise money for Cancer Research - in return I'll have my head shaved
| 5 |4
2009-07-08 | 12 |2
2009-07-07 | 5 |4
2009-07-06 | 2 |7
2009-07-03 | 2 |6
2009-07-02 | 7 |5
2009-07-01 | 19 |3
2009-06-30 | 20 |3
--
Gary Stainburn
This email does not contain private
first query here */) ordersQuery
NATURAL RIGHT JOIN (/* ur second query goes here */) deliveryQuery
ORDER BY deliveryQuery.o_date DESC
Tararabite,
Oliveiros
@Allgarve
2009/7/13 Gary Stainburn gary.stainb...@ringways.co.uk
hi folks
i have the following:
select o_ord_date as o_date
with only one record.
I seem to think I need an update. from. statement
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act
1 1/2 minutes. I've noticed that other updates
also seem to take a long time.
Could I have any suggestions on how I could start looking into why this is.
Could it be the config of postgresql, issues with my schema, or something
else?
Gary
--
Gary Stainburn
This email does not contain
On Tuesday 01 July 2008 12:17, Richard Huxton wrote:
Gary Stainburn wrote:
update used_diary set
ud_valet_completed=now(), ud_valet_completed_by=25
where ud_valet_completed is null and
ud_valet_required CURRENT_DATE-'7 days'::interval
is still running after approx
June 2008 09:44, Gary Stainburn wrote:
Hi folks
I've got the following table and view and I don't know exactly how to get
what I want.
The table contains integers for the number of months.
I want the view to convert those month integers to intervals that it can
add/subtract from a date
start_date to be CURRENT_DATE-'6 months'::interval
Any ideas?
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
--
Sent via
(ud_stock)
used_diary_ud_pex_valet_completed btree (ud_pex_valet_completed)
used_diary_ud_valet_completed btree (ud_valet_completed)
used_diary_valet_required btree (ud_valet_required)
used_diary_vin_index btree (ud_vin)
--
Gary Stainburn
This email does not contain private
matches the given name and argument types. You may need to
add explicit type casts.
goole=#
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory
-1.fc5
postgresql-contrib-8.1.9-1.fc5
postgresql-server-8.1.9-1.fc5
postgresql-docs-8.1.9-1.fc5
postgresql-python-8.1.9-1.fc5
postgresql-8.1.9-1.fc5
postgresql-test-8.1.9-1.fc5
postgresql-tcl-8.1.9-1.fc5
[EMAIL PROTECTED] ~]#
--
Gary Stainburn
This email does not contain private
', 'r_id')
RI_ConstraintTrigger_110509 AFTER INSERT OR UPDATE ON requests FROM
plates NOT DEFERRABLE INITIALLY IMMEDIATE FOR EAC
H ROW EXECUTE
PROCEDURE RI_FKey_check_ins('unnamed', 'requests', 'plates', 'UNSPECIFIED',
'r_plates', 'pl_id')
goole=#
--
Gary Stainburn
This email does not contain
need it very soon
Regards
Penchal
Surely this would easiest be done using a view rather than a trigger or
function. Simply have the salary calculated every time the view is selected.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped
;
}
This sets up an array with some pseudo values and then populates it with
*proper* values from a table.
How's the best way to do this all within SQL.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
On Friday 06 July 2007 16:02, Andrew Sullivan wrote:
On Fri, Jul 06, 2007 at 02:25:08PM +0100, Gary Stainburn wrote:
This sets up an array with some pseudo values and then populates it with
*proper* values from a table.
How's the best way to do this all within SQL.
I'm obviously
a workday function which seems to
do what I want.
Any help would be appreciated.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act
* days.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
create or replace function easter_sunday(year integer) returns
, v_vin, v_status from vista_details where v_vin
not in (
goole(# select substring(w_vin from '(.{11}$)') from walon);
v_d_code | v_o_number | v_vin | v_status
--++---+--
(0 rows)
--
Gary Stainburn
This email does not contain private or confidential material
On Saturday 05 May 2007 01:57, Tom Lane wrote:
Gary Stainburn [EMAIL PROTECTED] writes:
I have the query below which when run takes approx 3 seconds. However
when I add the condition 'and w_ws_id = 10' onto the end changes to 30+
seconds. Can anyone see why? I've included the explain
}$)') = w_vin
left outer join vista v on v.v_vin = w_vin
where w_hide = 0.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
1
2007-04-13 4 3 1
2007-04-14 5 5 1
2007-04-15 5 6 1
giving
1 1 2007-04-01 2007-04-01 1
2 1 2007-04-10 2007-04-15 4
--
Gary Stainburn
This email does not contain private or confidential
-21 | 2007-04-22 | 2 | 0 | 2
1 | 28 | 2007-03-01 | 2007-03-01 | 1 | 0 | 1
2 | 28 | 2007-03-02 | 2007-03-07 | 6 | 0 | 6
(6 rows)
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped
,a.afdate)
left join roster_staff r on r.rsdate = date_range;
Can anyone see any problems or improvements to this?
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes
AS $PROC$
DECLARE
wdate date;
BEGIN
return next fdate;
wdate:=fdate+1;
while wdate = tdate LOOP
return next wdate;
wdate:=wdate+1;
end LOOP;
return;
END;
$PROC$ LANGUAGE plpgsql;
--
Gary Stainburn
This email does not contain private or confidential material as it
may
that.
Because the else is NULL, count does work. Although I would imagine sum will
also work, count more reflects the logic, i.e. the number of times that
condition is true
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government
| 6 |0
10| 10|rr Motor| 7 |0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 5 |0
34| 34|ff fff | 3 |0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |0
102| 102| xxx| 1 |0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |0
--
Gary Stainburn
This email does not contain private
| ND9057
1795 | YC06SGX | ND | ND9057
2634 | YB06KHT | NL | NL6450
2620 | YF06ZKD | ND | ND9236
(21 rows)
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties
On Friday 07 July 2006 11:29, Gary Stainburn wrote:
I know this is probably a FAQ but Google etc hasn't helped.
I have two tables, both with stock number and registration number in.
The second table always has the correct stock number, the first doesn't.
I want to copy the data across where
---+
150mm | LD AD Asp XR Macro
(1 row)
The brackets surround the required match
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation
On Wednesday 26 October 2005 4:21 pm, Gary Stainburn wrote:
Hi folks
I've got a table holding item code(cs_id), supplier a/c (co_id) , and
price (cs_price).
How can I select the rows containing the lowest price for each item
code?
I've tried various forms of min() etc and know it must
, one for the start date/time and one for
the return date/time.
How do I go about creating constraints on inserts and updates to ensure
that
a) the finish is after the start
b) two allocations for a single vehicle don't overlap.
--
Gary Stainburn
This email does not contain private
.
Gary
On Friday 01 Apr 2005 1:46 pm, you wrote:
Can you send the EXPLAIN ANALYZE of each? We can't really tell where
the slowdown is without that.
On Apr 1, 2005 12:32 PM, Gary Stainburn
[EMAIL PROTECTED] wrote:
Hi folks.
I've got my select working now, but I haven't received the speed
= d.d_id,
left outer join departments de on r.r_de_id = de.de_id,
left outer join customers c on r.r_c_id = c.c_id,
left outer join comment_tallies co on r.r_id = co.r_id
ORDER BY r.r_id;
psql:new-view.sql:19: ERROR: parser: parse error at or near left
--
Gary Stainburn
This email does not contain
On Friday 01 April 2005 1:01 pm, you wrote:
On Friday 01 Apr 2005 5:06 pm, Gary Stainburn wrote:
Hi folks.
I've been looking at this for 10 minutes and can't see what's
wrong. Anyone care to enlighten me.
comma after 'r'?
I'd only just added that comma, to try to fix
on r.r_plates = pl.pl_id
ORDER BY r.r_id;
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
---(end
=#
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
---(end of broadcast
p_name = \'SPARE\', p_location = \'spare\',
p_site = \'L\'
where p_id = 2;
This isn't quite what I want. I want to SWAP the p_name and p_location
between the two records, not set them to static values.
Any help would be appreciated.
--
Gary Stainburn
This email does not contain private
);
ERROR: parser: parse error at or near p_owner
hardware=#
Sorted it. The 'IF' should be 'WHEN'
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation
appreciated)
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
---(end of broadcast
are
not bumped to the top of the list, but instead appear in their correct
position in the order by value part.
Is it possible and if so how do I do it?
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
On Wednesday 09 March 2005 1:06 pm, you wrote:
Gary Stainburn wrote:
Hi folks.
I seem to remember somewhere being shown how to bump specific rows
to the top of a list; something along the lines of:
select c_id as key, c_des as value from customers order by c_id =
7, c_id = 160
of owned
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
---(end of broadcast
piece_pieces.pp_part=pieces.p_id;
Under Sean's suggestion I did this inside a transaction block so I could
check that it did what I wanted.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
-01-01 09:12:12 and Root should return 4, 2004-11-10
12:12:00
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
On Tuesday 16 November 2004 1:08 pm, sad wrote:
On Tuesday 16 November 2004 14:29, Gary Stainburn wrote:
Hi folks.
I'm looking at the possibility of implementing a photo gallery for
my web site with a tree structure
How would I go about creating a view to show a) the number
branch != 'Doncaster'
and
select * from stock_available where branch != 'Leeds'
which only return the equivelent of the top two (we only have Leeds and
Doncaster) are les than 1 second.
Anyone got any ideas of the cause, or thoughts on how I can trace the
problem?
--
Gary Stainburn
This email
On Thursday 28 October 2004 11:16 am, Gary Stainburn wrote:
Hi folks.
I have the following view:
CREATE VIEW stock_available as
SELECT * FROM stock_details
WHERE available = true AND visible = true AND
location not in (SELECT descr FROM ignored);
Stock_details is itself a view
On Thursday 28 October 2004 3:25 pm, Tom Lane wrote:
Gary Stainburn [EMAIL PROTECTED] writes:
Anyone got any ideas of the cause, or thoughts on how I can trace
the problem?
EXPLAIN ANALYZE results for the fast and slow cases would be
interesting. Also, have you ANALYZEd the underlying
requests set r_fuel=what, r_c_id = 7 where r_c_id in (...
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
On Monday 21 Jun 2004 4:11 pm, Gary Stainburn wrote:
On Monday 21 Jun 2004 3:19 pm, Tom Lane wrote:
Gary Stainburn [EMAIL PROTECTED] writes:
from requests r, users u, request_types t,
request_states s, dealerships d, departments de, customers c
left outer join
: JOIN/ON clause refers to requests, which is not
part of JOIN
[EMAIL PROTECTED] gary]$
which at least makes sense.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes
On Monday 21 Jun 2004 3:19 pm, Tom Lane wrote:
Gary Stainburn [EMAIL PROTECTED] writes:
from requests r, users u, request_types t,
request_states s, dealerships d, departments de, customers c
left outer join (select co_r_id, count(co_r_id) from comments
group
=#
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
---(end of broadcast
On Wednesday 12 May 2004 11:02 am, Gary Stainburn wrote:
Hi folks.
[snip]
create view order_summary as
select
c.cs_id, cs.count as qty, c.cs_make, c.cs_code, c.cs_type,
cst.cst_desc, c.cs_colour,
o.or_id,
o.or_supp, o.or_date, o.or_received, o.or_no, orst.orst_desc
as
select cost_cs_id, cost_cl_id, cost_css_id, count(*) as qty
from cons_stock
group by cost_cs_id, cost_cl_id, cost_css_id;
I then have trouble joining this to the consumables and locations table to get
the results I need.
--
Gary Stainburn
This email does not contain private or confidential
, cost_css_id;
Regards,
Stijn Vanroye
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
--
Gary Stainburn
This email does not contain private or confidential material as it
may
On Monday 19 April 2004 4:01 pm, Gary Stainburn wrote:
On Monday 19 April 2004 3:06 pm, Stijn Vanroye wrote:
Gary wrote:
Hi folks,
here's a straight forward join that I simply can't get my head round.
I've got
consumables: cs_id, cs_make, cs_comments
cons_locations
On Tuesday 16 March 2004 5:56 pm, Frank Finner wrote:
On Tue, 16 Mar 2004 16:54:18 + Gary Stainburn
[EMAIL PROTECTED] sat down, thought
long and then wrote:
Hi folks.
I've got a last_updated field on my stock records of type timestamp.
This last_updated field I get using the perl
Hi folks.
I've got a last_updated field on my stock records of type timestamp.
This last_updated field I get using the perl code:
my $timestamp=(stat $localcsv/VehicleStock.$data_suffix)[10];
How can I insert the integer timestamp in $timestamp into my table?
--
Gary Stainburn
This email
to regcount in case it was a reserved word
problem).
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
group by account) as s
bank-# on s.account = a.key;
I get
ERROR: No such attribute or function 'key'
Any ideas why?
Also, I'm sure I can do this more efficiently as a single select/join, but
can't seem to work out why (Friday morning syndrome). Anyone give me a clue?
--
Gary Stainburn
1 - 100 of 150 matches
Mail list logo