Tomasz Myrta wrote:
Can you try this query ? :
select cd_area from area a1
join teacher_course c2 using (cd_course)
where (cd_teacher,cd_course) in (select 1,2 union select 98,45 union
select 11,0);
Tomasz, the "in" in the query above will work like an "or"
((cd_teacher=1,cd_course=2) or (c
How about this:
select cd_area from area a1 where
not exists ((select 1,2 union select 98,45 union select 11,0) except
select c2.cd_teacher,c2.cd_course from teacher_course c2 where
c2.cd_course=a1.course)
?
Tom Lane wrote:
Daniel Henrique Alves Lima <[EMAIL PROTECTED]> writes:
I
Of all the proposed solutions, this appears to run the fastest, and not
require the creation of an additional table.
Thanks!
Terry Fielder
Manager Software Development and Deployment
Great Gulf Homes / Ashton Woods Homes
[EMAIL PROTECTED]
Fax: (416) 441-9085
> -Original Message-
> From:
Hi,
Is there a way to retrieve the current value (i.e. the last used value) of the
last used sequence without specifying the sequence name? Something like the
following:
create table ( id serial, value varchar(10));
insert into someOthertest (value) values ('100');
insert into test (value) values
O kyrios ow egrapse stis Mar 9, 2004 :
> Hi,
>
> Is there a way to retrieve the current value (i.e. the last used value) of the
> last used sequence without specifying the sequence name? Something like the
> following:
>
> create table ( id serial, value varchar(10));
> insert into someOthertest
--- Achilleus Mantzios <[EMAIL PROTECTED]> wrote:
>
> You could use the same sequence in many tables.
>
I guess I could but then:
1) I'd still have to know the sequence name. When integrating pgSql with 3party
frameworks I'd either have to pass it there (could be a very difficult task) or
make
Just one more to add to the pile. Got it from Celko's "SQL for
Smarties", under the relational division section.
I'd make a temporary table for the items on the list.
CREATE TEMP TABLE select_items (
item_id foo NOT NULL UNIQUE
REFERENCES items(item_id)
);
SELECT DISTINCT vi1.ven
O kyrios ow egrapse stis Mar 9, 2004 :
>
> --- Achilleus Mantzios <[EMAIL PROTECTED]> wrote:
> >
> > You could use the same sequence in many tables.
> >
>
> I guess I could but then:
>
> 1) I'd still have to know the sequence name. When integrating pgSql with 3party
> frameworks I'd either ha
On Tuesday 09 March 2004 13:50, ow wrote:
> Hi,
>
> Is there a way to retrieve the current value (i.e. the last used value) of
> the last used sequence without specifying the sequence name? Something like
> the following:
>
> create table ( id serial, value varchar(10));
> insert into someOthertest
At some point in time, [EMAIL PROTECTED] (Mike Moran) wrote:
>Hi. I currently have a fairly large query which I have been optimizing
>for later use in a function. There are things in the query which I
>have been keeping constant whilst optimizing, but which are variables
>in the function. When I r
ow <[EMAIL PROTECTED]> writes:
> I guess I could but then:
> 1) I'd still have to know the sequence name. When integrating pgSql
> with 3party frameworks I'd either have to pass it there (could be a
> very difficult task) or make some assumptions (also not very good).
This scenario is really enti
--- Tom Lane <[EMAIL PROTECTED]> wrote:
> or that the last one that's touched is the one you want?
Correct.
__
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster
http://search.yahoo.com
---(end of broadcast)---
Where can i find the documentation about "except" or "textcat" ?
I've looked at html docs in my machine (i've a 7.34 copy) and i
couldn't found information/sample of them.
Thanks.
---(end of broadcast)---
TIP 7: do
On Tue, Mar 09, 2004 at 17:13:37 -0300,
Daniel Henrique Alves Lima <[EMAIL PROTECTED]> wrote:
>Where can i find the documentation about "except" or "textcat" ?
> I've looked at html docs in my machine (i've a 7.34 copy) and i
> couldn't found information/sample of them.
except should be
On Tuesday 09 March 2004 18:33, you wrote:
> Hi. If it wouldn't be too much of a bother could you send me sample code
> that used SQL commands to insert a bytea as well as retrieve, that includes
> the encode / decode stuff? I have been struggling to figure out how to get
> this to work. I am us
Hello,
My company recently deployed Pg 7.4.1. on Solaris for an experimental
project and is using the experience to evaluate its viability for
migration from Oracle 7.0.
While I like a lot of the features of Pg, one thing I noticed that
"seems" to be missing is the ability to set multiple fiel
Jeff Boes <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> At some point in time, [EMAIL PROTECTED] (Mike Moran) wrote:
>
> >Hi. I currently have a fairly large query which I have been optimizing
> >for later use in a function. There are things in the query which I
> >have been k
On Tue, 9 Mar 2004, Marty Scholes wrote:
> Hello,
>
> My company recently deployed Pg 7.4.1. on Solaris for an experimental
> project and is using the experience to evaluate its viability for
> migration from Oracle 7.0.
>
> While I like a lot of the features of Pg, one thing I noticed that
> "se
Hello,
Trying to convert the query below to a view. The problem is
despite it working as a query when trying to save it as a
view the database returns the error that the field tablealias.cmpname
is duplicated. (Which it is and has to be)
So how to a refer to the same table more than once and
get
On Tue, 9 Mar 2004, Richard Grosse wrote:
> Trying to convert the query below to a view. The problem is
> despite it working as a query when trying to save it as a
> view the database returns the error that the field tablealias.cmpname
> is duplicated. (Which it is and has to be)
You're going to
Hi,
i try to connect to my database as $ psql dwnc biosadm but got the error
"psql: FATAL: No pg_hba.conf entry for host localhost, user
biosadm, database dwnc"
Below are the detail in pg_hba.conf
# TYPE DATABASEUSERIP-ADDRESSIP-MASK
METHOD
local
On Tue, Mar 09, 2004 at 14:48:57 -0700,
Marty Scholes <[EMAIL PROTECTED]> wrote:
>
> While I like a lot of the features of Pg, one thing I noticed that
> "seems" to be missing is the ability to set multiple fields in an update
> using a correlated subquery.
You can't set more than one column
Hi,
by the way i've settle my connection problem between client application and server itself . this is happen because of editing the parameter in pg_hba.conf
while the environment(database was running) was active. tq
[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
12:12 PM Today
Hi,
i'm using PostgreSQL as my database and now i'm looking for a good reporting tools(can do ad-hoc queries & ease of use)
that can connect to several database instead of PostgreSQL.
thanks in advance
On Wed, Mar 10, 2004 at 02:17:31PM +0800, [EMAIL PROTECTED] wrote:
>
> i'm using PostgreSQL as my database and now i'm looking for a good
> reporting tools(can do ad-hoc queries & ease of use)
> that can connect to several database instead of PostgreSQL.
> thanks in advance
see : http://www.
25 matches
Mail list logo