Re: [SQL] Query Help

2000-12-28 Thread patrick . jacquot
"Brian C. Doyle" wrote: > What do I have to do a query where information in table1 is not in table2 > > I am looking for something like > > Select table1.firstname where table1.firstname is not in table2.firstname > and table2.date='yesterday' > > I tried > Select table1.firstname where table1.fi

[SQL] Strange Execution-Plan for NOT EXISTS

2000-12-28 Thread Jens Hartwig
Hello all, I tried (just for academical fun) to resolve ID´s which are not used anymore, e.g.: ID NAME -- + -- 1 | NOBODY 2 | ANYBODY 4 | EVERYBODY Now I want to get "3" as the next usable ID. I really know that this is kind of bad style but a friend of mine asked me if I h

Re: [SQL] Query Help

2000-12-28 Thread Brian C. Doyle
Thank you to everyone with their suggestions. Where on the PostgreSQL site would I have found more info on the NOT EXISTS At 11:20 AM 12/27/00 -0500, you wrote: >What do I have to do a query where information in table1 is not in table2 > >I am looking for something like > >Select table1.firs

Re: [SQL] How to represent a tree-structure in a relational database

2000-12-28 Thread Ron Peterson
Ron Peterson wrote: > > This structure is more 'normal' in the sense that nodes without children > (in a tree, the leaf nodes) don't have records in the edge table. Phghpth. Should have had my coffee first. The first data structure given would only have a null parent id for the root node, not

[SQL] 7.1 feature?

2000-12-28 Thread Kaare Rasmussen
I need to do something like this: SELECT n.name FROM (SELECT p.contact_seq AS contact_seq, p.lastname||', '||p.firstname AS name FROM person p UNION SELECT co.name AS name FROM company co) n; Of course there's more; this is cut from the original select. But PostgreSQL complains about SELECT

Re: [SQL] 7.1 feature?

2000-12-28 Thread Tom Lane
Kaare Rasmussen <[EMAIL PROTECTED]> writes: > In the dox I read: You're reading the 7.1 docs. 7.0 docs live at http://www.postgresql.org/users-lounge/docs/7.0/postgres/postgres.htm regards, tom lane

[SQL] rserv

2000-12-28 Thread Ingram, Bryan
I'm getting ready to spend some time testing out the new replication server. The documentation is sparse, so I'm wondering if there are any known bugs? Also, is there a specific forum/list for discussion of the server? Thanks ... Bryan Ingram

[SQL] MD5 use in PL/Perl

2000-12-28 Thread Marc Rassbach
I'd like to be able to only store the database of usernames and passwrods here locally as a md5 hash. (in case the black hats come to visitI'd like to make life hard for them) Using AuthPG, I should be able to create a SQL call to postgresbut there is no native md5 hashing function. I

Re: [SQL] MD5 use in PL/Perl

2000-12-28 Thread Peter Eisentraut
Marc Rassbach writes: > Attempting to xlate to PL/Perl > > settle=# create function md5out3(varchar) returns varchar(32) as ' > settle'# use MD5; > settle'# my $mdval = new MD5; > settle'# my $result ; > settle'# my $out; > settle'# $mdval->add($_[0]); > settle'# $result = $mdval->digest(); > set

[SQL] How to trim values?

2000-12-28 Thread jkakar
Hi, I'm trying to figure out how to take a value like 3.68009074974387 (that is calculated from values in my database) and have PostgreSQL hand me 3.68. Any suggestions would be appreciated. Thanks, Jamu. -- Jamu Kakar (Developer) Expressus Design Studio, Inc. [EMAIL PROTECTE

[SQL] Simultaneous Connection Problem

2000-12-28 Thread Webb Sprague
I have a table that is sequence_number (my PK), session_start_time, and session_stop_stime. I would like to query it to determine the max number of simultaneous sessions. Has anyone conquered a problem like this? It seems like it should be in a book somewhere, but I haven't found it yet. Thank

Re: [SQL] How to trim values?

2000-12-28 Thread Oliver Elphick
[EMAIL PROTECTED] wrote: >Hi, > >I'm trying to figure out how to take a value like 3.68009074974387 >(that is calculated from values in my database) and have PostgreSQL >hand me 3.68. Any suggestions would be appreciated. cast it to numeric(x,2) (where x is the total number of digits,

[SQL] Looking for comments

2000-12-28 Thread Thomas SMETS
Rather thant making long sentences & comment. Anyone willing to give me a little help on this tables definition is welcome http://lautre.org/tsmets/DB.html Tomorrow the pageswill be colorized a little bit more & a drawing of the expected tables will be provided. Tx, Thomas, -- Thu Dec 28