Try this:
select distinct vendor_no, vendor_name
from ap_vendors
where vendor_no in (
select vendor_no from ap_vendors
group by vendor_no
having array_agg(company_code) @> ARRAY['BUR','EBC','SNJ'])
On Wed, Oct 5, 2016 at 1:31 PM, Bret Stern wrote:
>
> On Oct 4, 2016, at 9:31 PM, Bret Stern
> wrote:
>
> Good evening,
> I'm curious about a way to ask the following question of my vendors
> table.
>
> psuedo1 "select all vendors which exist in BUR and EBC and SNJ"
>
> and
> psuedo2 "select all vendors which
Good evening,
I'm curious about a way to ask the following question of my vendors
table.
psuedo1 "select all vendors which exist in BUR and EBC and SNJ"
and
psuedo2 "select all vendors which DO NOT exist in all three show rooms
The data is from a Sage accounting system which I pull out and
Hi,
I have a table
select id, config_id, start_day, end_day, start_time, end_time from config;
id | config_id | start_day | end_day | start_time | end_time
-+---+---+-++--
1 | 101 | Mon | Sun | 08:30:00 | 18:00:00
2 |
novice [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
15/08/2008 08:32 AM
To
pgsql-general@postgresql.org
cc
Subject
[GENERAL] Query help
Hi,
I have a table
select id, config_id, start_day, end_day, start_time, end_time from
config;
id | config_id | start_day | end_day | start_time
2008/8/15 novice [EMAIL PROTECTED]:
Hi,
I have a table
select id, config_id, start_day, end_day, start_time, end_time from config;
id | config_id | start_day | end_day | start_time | end_time
-+---+---+-++--
1 | 101 | Mon |
If I read this correctly, you want the output sorted by
config_id,start_day(day),start_time,
thus:
select config_id, start_day as day, start_time, end_time from config
order by config_id, start_day, start_time;
Cheers,
Brent Wood
novice [EMAIL PROTECTED] 08/15/08 3:55 PM
Hi,
I have a
hello
table is
+---+---+--+---+
| id | one | two | three |
+---+---+--+---+
| first | Jack | Jill | Mary |
| last | Ja | Ji | Ma |
+---+---+--+---+
result is
++---+---+
| id | one | two |
++---+---+
| first
On 9/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
hello
table is
+---+---+--+---+
| id | one | two | three |
+---+---+--+---+
| first | Jack | Jill | Mary |
| last | Ja | Ji | Ma |
+---+---+--+---+
result is
On 9/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
query is??
http://www.w3schools.com/sql/default.asp
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL
hello
i add more column not row for new user. i want all last like 'J%'.
http://www.nabble.com/an-other-provokative-question---tf4394285.html
sincerely
siva
Original Message
Subject: Re: [GENERAL] query help
From: Alexander Staubo [EMAIL PROTECTED]
Date: Thu, September 13, 2007
On 9/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
i add more column not row for new user. i want all last like 'J%'.
http://www.nabble.com/an-other-provokative-question---tf4394285.html
Sorry, but the only difference between your table example and your
result example was the absence, in
[EMAIL PROTECTED] wrote:
hello
i add more column not row for new user. i want all last like 'J%'.
http://www.nabble.com/an-other-provokative-question---tf4394285.html
sincerely
siva
You add a new _column_ for each user?!? That is hideously broken in so
many ways. It makes the trivially easy
many apologees. right link
http://archives.postgresql.org/pgsql-general/2007-09/msg00607.php
i flip row to column if ok. but howto query??
sincerely
siva
Original Message
Subject: Re: [GENERAL] query help
From: Alexander Staubo [EMAIL PROTECTED]
Date: Thu, September 13, 2007 11
[EMAIL PROTECTED] wrote:
hello
i add more column not row for new user. i want all last like 'J%'.
I get the feeling that the result as you've laid it out is not what we
all think it is. For example:
table is
+---+---+--+---+
| id | one | two | three |
can u refer to row?? howto select * from table where row(#2) like 'J%'??
i wanted to test column storing but not ok as no row refer name/id.
many thank yous
sincerely
siva
Original Message
Subject: Re: [GENERAL] query help
From: [EMAIL PROTECTED]
Date: Thu, September 13, 2007 11
I need some help with rewriting a query. I have a fairly complicated
query (for me anyway) that dumps daily climate data, filling in
missing data with monthly averages (one line per day).
I want to output monthly averages (one line per month). I am having a
hard time wrapping my head
On 8/14/07, Kirk Wythers [EMAIL PROTECTED] wrote:
I need some help with rewriting a query. I have a fairly complicated query
(for me anyway) that dumps daily climate data, filling in missing data with
monthly averages (one line per day).
I want to output monthly averages (one line per
Madison Kelly wrote:
Hi all,
I've got a query that looks through a table I use for my little search
engine. It's something of a reverse-index but not quite, where a proper
reverse index would have 'word | doc1, doc3, doc4, doc7' showing all the
docs the keyword is in, mine has an entry for
Richard Huxton wrote:
Madison Kelly wrote:
Hi all,
I've got a query that looks through a table I use for my little
search engine. It's something of a reverse-index but not quite, where
a proper reverse index would have 'word | doc1, doc3, doc4, doc7'
showing all the docs the keyword is
Hi all,
I've got a query that looks through a table I use for my little
search engine. It's something of a reverse-index but not quite, where a
proper reverse index would have 'word | doc1, doc3, doc4, doc7' showing
all the docs the keyword is in, mine has an entry for eac
I've got a
Try
SELECT DISTINCT
rather than SELECT
That should return a result with unique records.
Madison Kelly wrote:
Hi all,
I've got a query that looks through a table I use for my little
search engine. It's something of a reverse-index but not quite, where
a proper reverse index would have
Tom Lane wrote:
It looks like you have a stale plan for that ON DELETE SET NULL
constraint. Was there perhaps an index on operator_id that you removed?
Postgres is not very good about flushing cached plans when you change
table schemas (something I hope will be fixed in 8.3).
If that is the
Hi All,
I am getting an error I do not understand from the following setup
CREATE TABLE timesheet_booking
(
timesheet_booking_id bigserial NOT NULL,
operator_id integer,
booking_item_id integer,
day date NOT NULL,
minutes integer NOT NULL,
CONSTRAINT timesheet_booking_pkey PRIMARY KEY
Howard Cole [EMAIL PROTECTED] writes:
If I try the following query:
delete from operator where operator_id=283;
I get the following error message:
ERROR: could not open relation with OID 438427
SQL state: XX000
Context: SQL statement UPDATE ONLY public.timesheet_booking SET
Jeff Patterson wrote:
This seems like such a basic function that I'm sure I am missing something
fundamental. I have a table, say xref, whose columns are primary key
values for other tables. Some of theses keys may be NULL for a given row
in xref. I want to create a query that returns the
This seems like such a basic function that I'm sure I am missing something
fundamental. I have a table, say xref, whose columns are primary key values for
other tables. Some of theses keys may be NULL for a given row in xref. I want
to create a query that returns the corresponding entries in the
On Fri, 7 Sep 2001, Jeff Patterson wrote:
This seems like such a basic function that I'm sure I am missing something
fundamental. I have a table, say xref, whose columns are primary key values for
other tables. Some of theses keys may be NULL for a given row in xref. I want
to create a query
PROTECTED] on 08/30/2001 07:45:20 PM
To: [EMAIL PROTECTED]
cc:(bcc: Wesley Sheldahl/Lex/Lexmark)
Subject: [GENERAL] query help
Hi all,
How would I get TableB.label if all I know about is TableA.name?
I was thinking about a query on TableA first, then within the while
(rs.next()), I'd do
29 matches
Mail list logo