|80 | 2013-10-10 | 4 | 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@post
he
-- standard week
create table site_user_department_date_limit (
s_idchar not null,
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
e text,
> primary key (sp_id) 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
Rin
I get 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
roup by stts_id;
>
> another simple solution with distinct on:
>
> select distinct on (stts_id, stts_offset) stts_id,
> 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.ri
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
timeta
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 would
have other tables that refer to *destinations* which will be an ID that
could be either an extension or a group. Examples are 'Direct Dial In'
numbers which could point to either. How would I do that?
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
st_id
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
n staff t on t.st_id = 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-sq
le rows in pieces_requests with the same p_id, r_id pairing?
> Your join must be resulting 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
4900 | 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.post
on, but I'm
wondering how I would include this is the select / view .
Gary
--
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
that a typo? if not how am i to interpret
> it?
The table contains date_1, 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
Rin
was what I 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 pg
date_1 > date3 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
On Thursday 24 May 2012 09:17:00 Pavel Stehule wrote:
> please, WHERE (ud_id, ud_pex_registration) = (SELECT ...
>
> replace by
>
> WHERE (..) IN (SELECT ..
>
> Regards
>
> Pavel
Worked perfectly, thank you
--
Gary Stainburn
Group I.T. Manager
Ringways Garage
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 sto
and of the
> desired output? For me it would be easier...
>
> Best,
> Oliver
>
> - Original Message -
> From: "Gary Stainburn"
> To:
> Sent: Wednesday, May 23, 2012 10:27 AM
> Subject: [SQL] left outer join only select newest record
>
> > Hi f
gistration = 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
t;
> http://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
select u_id || ':' || rm_timestamp::date as key from request_reminders where
u_id is not null and rm_timestamp>='2012-03-26' and rm_timestamp <=
('2012-03-26'::date + '7 days'::interval);
key
---
25:2012-03-27
25
ent_user_level shouldn't have a field named fl_f_id, to
> identify which facility the document/folder belongs to?
> Had it such a field, you could do something like
> FOREIGN_KEY (fl_f_id,fl_level) REFERENCES facility_levels (fl_f_id,
> fl_level)
>
>
> Just my two cents
le storing only facility_levels for
> fl_f_id 22. The foreign key would reference the child table 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
s 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
ick to using RPM's.
Can I upgrade to 9.1 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
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.
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 Ga
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 c
g using Postgresql 8.1 until I
can evaluate 8.4 on my 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
date+1;
while 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
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)
>
>
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 (pgsq
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)
>
> Firs
(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 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
Ringway
LL;
END IF;
IF eta > req_date 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 chan
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&
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
w on a database 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 fo
.o_id
>LEFT JOIN orders_log ol
> 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 Canc
d it's associated user - i.e. who made the the last log
entry and when.
I suppose I'm asking how I would do the sub-query to pull the most recent log
entry per order.
--
Gary Stainburn
Gary's Haircut 700
Please visit http://www.justgiving.com/Gary-Stainburn/ to help me
raise mone
?
Cheers
--
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 subscrip
y.o_date , orders, delivery
> FROM (/* ur 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
>
4 |3
2009-07-09 | 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 emai
ved all vehicles 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 Investig
_id,ROWLENGTH;
END IF;
RETURN NEW;
END;
$proc$ LANGUAGE plpgsql;
CREATE TRIGGER compound_bays_range_check BEFORE INSERT OR UPDATE on
compound_bays
FOR EACH ROW EXECUTE PROCEDURE compound_bays_range_check();
--
Gary Stainburn
This email does not contain private or confidential material
t4 not null
);
alter table compound_bays add constraint compound_bays_row_check
foreign key (co_id, cr_id) references compound_rows(co_id,cr_id);
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
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-'
T_DATE-'7 days'::interval
is still running after approx 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
ts;
On Wednesday 04 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 inte
s 6 I need 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, 200
e (ud_handover_date)
"used_diary_reg_index" btree (ud_registration)
"used_diary_required" btree (ud_required)
"used_diary_stock_index" btree (ud_stock)
"used_diary_ud_pex_valet_completed" btree (ud_pex_valet_completed)
"used_diary_ud_valet_com
) does not exist
HINT: No function 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 pur
# rpm -qa|grep postgresql
postgresql-jdbc-8.1.9-1.fc5
postgresql-libs-8.1.9-1.fc5
postgresql-pl-8.1.9-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.
', 'requests',
'UNSPECIFIED', 're_id', 'r_id')
"RI_ConstraintTrigger_110469" AFTER UPDATE ON requests FROM recipients NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW
EXECUTE
PROCEDURE "RI_FKey_noaction_upd"('', 'recip
triggers to call that function when
> current date and antedate is equal...
>
>
>
> Any one can help on this... I 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 ca
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
ame"
)
as $key=>$dets) {
$wpartners[$key]=$dets;
}
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 privat
attached the code for anyone who want to use or improve it.
It should be fairly simple to write a function to use that dataset to ignore
*non-working* days.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government part
7;ve found that MS Excel has 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 - Regulati
t not return the row?
select v_d_code, v_o_number, 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
Thi
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.
w_vin
left outer join stock s on substring(s.s_vin from '(.{11}$)') = 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 unkn
1 | 2007-04-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 sn
5 1
2007-04-11 4 6 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 n
overlaps
(a.asdate,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
e) returns setof
date
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 confid
not do 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 o
0 | 2 |0
12| 12||13 |0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 5 | 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
order_details
where date_trunc('month',CURRENT_DATE) = date_trunc('month',o_ord_date)
group by o_p_id, p_name;
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and
x27;) as BASE_NAME,
substring('150mm LD AD Asp XR Macro','^\\d+mm (.*)$') as SUFFIX;
base_name | suffix
---+
150mm | LD AD Asp XR Macro
(1 row)
The brackets surround the required match
--
Gary Stainburn
This email does not con
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
270
2591 | YF06OJM | NL | NL6351
2627 | YC06SGX | ND | ND9057
1795 | YC06SGX | ND | ND9057
2634 | YB06KHT | NL | NL6450
2620 | YF06ZKD | ND | ND9236
(21 rows)
--
Gary Stainburn
This email does not contain private or confi
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 v
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 be simple but I'm
stumped.
Gary
--
Gary Stainbu
, 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 priva
for the help anyway.
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.
> >
>
in plates pl 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
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 '
s d on r.r_d_id = 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
Th
#x27; THEN 'A' ELSE owner END) WHERE owner IN ('A','B')
>
> Hello again.
>
> I've tried the first one but get a syntax error. Anyone see why?
>
> hardware=# update pieces set p_owner = (case if p_owner = 305 then
> 724 else 305 end) where p_
p_site = \'L\' where p_id = $1;
>
> update pieces set 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 record
get a syntax error. Anyone see why?
hardware=# update pieces set p_owner = (case if p_owner = 305 then 724
else 305 end) where p_owner in (305, 724);
ERROR: parser: parse error at or near "p_owner"
hardware=#
--
Gary Stainburn
This email does not contain private or confi
27;m not after someone to do my work for me, but a good starting point
would be very much 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 - Regula
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 val
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
rected version of a suggestion
by Sean Davis
update pieces set p_owner=piece_pieces.pp_id from piece_pieces where
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
of owner
pp_part -- id 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
---
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 wou
iddleton should
return 1, 2004-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 Inves
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
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 ign
t * from stock_available where 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 tr
#
What I want is something like
update requests set r_fuel=, 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 - Regu
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, dealershi
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, c
sts"
psql:goole1.sql:45: ERROR: 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
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
hardware=#
--
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
1 - 100 of 169 matches
Mail list logo