Hello, I have the following, A table call People with 3 fields AGE
(Int) NAME (Txt) COMPANY (TxT) and I want to create a query than get
me a list with the seniors per company, for example :
table PEOPLE
NAME AGE COMPANY
Bob 33 Acme
Jane30 Acme
Bill20 Acme
Jose
OK, I have 2 tables, table A:
ID FLAG
- -
1 1
2 1
2 2
3 1
3 2
3 3
and table B:
FLAG
-
1
2
I want to find all id's from table A that have every flag in table B
but no extra flags. So, I'd end up with:
ID
-
Cannot compile Postgres .7.x with gcc 2.9.6 (OS: HP-UX 11.0).
error messages:
..
..
gmake[3]: Entering directory
`/home/download/postgresql-7.0.2/src/backend/access/common'
gcc -I../../../include -I../../../backend -D_REENTRANT -I/usr/local/Berkeley
DB.3.2/include
Carl van Tast [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
Hi A.,
On 26 Sep 2001 07:24:41 -0700, [EMAIL PROTECTED] (A. Mannisto)
wrote:
Hello,
does anybody know why this:
SELECT * FROM tab WHERE col1 IN (SELECT col2 FROM TAB2)
equals this:
SELECT * FROM tab WHERE
Larry Holt wrote:
It really depends upon what kind of work you like to do.
For system admin, network engineering, etc. you need scripting like SED
AWK, PERL plus O/S commands. To be a programmer you need a language that
can be compiled: C, Java. A programmer usually does not need to parse
On 22 Sep 2001 19:18:10 -0700, [EMAIL PROTECTED] (Paolo Colonnello)
wrote:
Hello, I have the following, A table call People with 3 fields AGE
(Int) NAME (Txt) COMPANY (TxT) and I want to create a query than get
me a list with the seniors per company, for example :
table PEOPLE
NAME AGE
Hi, Thurstan
On Thu, 20 Sep 2001 17:30:46 +0100, Thurstan R. McDougle
[EMAIL PROTECTED] wrote:
[...]
Carl van Tast had 2 good methods as follows
SELECT userid, val
FROM tbl
WHERE NOT EXISTS (SELECT * FROM tbl AS t2
WHERE tbl.userid=t2.userid AND t2.ts tbl.ts);
or
SELECT
[EMAIL PROTECTED] (Bob Barrows) wrote in message
news:[EMAIL PROTECTED]...
Do you care about ties? What if Ingrid, 38 yrs old, worked at IBM?
Would you want to show both Ingrid and Maria? If so, this will work:
Select Name From People t1 Inner Join
(Select Company, Max(Age) As Oldest FROM
Is it any getlargeobject(oid) analog?
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
This is one way that comes up:
select id
from
(
select distinct a.id AS id
, b.flag AS flag
from A, B
where a.flag = b.flag
) a_distinct
where id not in
(select id from a where flag not in (select flag from b))
group by id
having count(*) = (select
Ross,
ID FLAG
- -
1 1
2 1
2 2
3 1
3 2
3 3
and table B:
FLAG
-
1
2
I want to find all id's from table A that have every flag in table B
but no extra flags. So, I'd end up with:
ID
-
2
Hi,
I have tried Carl's suggestion, but it does
not make a difference and the same
ERROR: parser: parse error at or near (
results.
I have rebuilt and reinstalled Version 7.1.3,
but still the same. No compilation or installation
errors are reported and simple statements seem
to work properly. In
I think you need return old, not return new, in the body of the
trigger if you want the delete to take place. new would be NULL in
a delete situation ...
regards, tom lane
---(end of broadcast)---
TIP 5: Have you checked
Ludek,
I have this problem (maybe only in my head ;o)):
Yup. Or it's a language problem. There's a fair Czech community of
PgSQL users, so hopefully you can get in touch with some of them. (Your
English is better than any of my 2nd languages -- it's just that
techincal docs are hard
On Fri, 21 Sep 2001, Ludek Finstrle wrote:
Hello,
I have this problem (maybe only in my head ;o)):
table1:
---
id | name
-
1 | 'blabla'
2 | 'arrrgh'
table2:
---
id | table1_id | name
-
1 | 1 | 'hello'
table3:
---
id |
I have this database and it was working with PG 7.1.2 !!!
When I try to delete a record the trigger is fired but the delete is
not executed.
---code start here
drop database test_trig;
create database test_trig;
\connect test_trig
--
-- TOC Entry ID 2 (OID
i have tried retrieving multiple values using setof function but i
couldnt solve it.when i am trying using setof iam getting this as
output.
1 CREATE FUNCTION hobbies (varchar) RETURNS SETOF bank
2 AS 'SELECT * FROM bank
3 '
4 LANGUAGE 'sql';
~
I have a query using the SUM() function that is not returning the
appropriate results.
There are 3 queries with results below. Query 1 is the type of query I'd
like to use, that has the SUM() function and a join with a customer table
(bolcustomer) to constrain the results to a particular
Why are you using PG 7.0.2? 7.1.3 is the current release.
regards, tom lane
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
I would like to compare the number of rows
of one table and of another and use it in
a query like this:
SELECT * FROM
WHERE number of rows of table
EQUALS
number of rows of table
i.e. I only want get a query result if the tables
Hi,
I have a problem connecting to the database using .odbc.ini file. The error
is:
SQLState = 28000
errorMessage:[Sybase][ODBC Driver][Adaptive Server Anywhere]Invalid user
authorization specification:Password must be atleast ??? characters
The program executes properly if the .odbc.ini
Hello,
I have this problem (maybe only in my head ;o)):
table1:
---
id | name
-
1 | 'blabla'
2 | 'arrrgh'
table2:
---
id | table1_id | name
-
1 | 1 | 'hello'
table3:
---
id | table2_id | name
-
SELECT * FROM table1 LEFT
Frederick Klauschen [EMAIL PROTECTED] writes:
I have rebuilt and reinstalled Version 7.1.3,
but still the same. No compilation or installation
errors are reported and simple statements seem
to work properly. In contrast to 7.0.3, the \d table
command does not work because
Robin's PG-SQL List [EMAIL PROTECTED] writes:
I have a query using the SUM() function that is not returning the
appropriate results.
I'm guessing that you have two rows in bolcustomer matching
bol_number = 88738, so that the 14 gets added in twice.
regards, tom lane
Hi all,
Is there a way to specify the default format for a timsetamp field?
Specifically, what I am trying to do is to use COPY to get the data out of a table to
be loaded into another database. I would like the timestamp fields accuracy to be
maintained (to at least 3 places for
25 matches
Mail list logo