Re: [SQL] Trouble with subqueries

2001-01-19 Thread Robert B. Easter
ed in returning a group row from a grouped table are aggregates on the group returned by that row, not the whole (ungrouped) table. Hope that makes sense. -- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompT

[SQL] MATCH

2001-01-09 Thread Robert B. Easter
MATCH is not implemented? -- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- -- http://www.comptechnews.com/~reaster/

[SQL] subselect test

2001-01-08 Thread Robert B. Easter
? Anyway, these new complex queries seem to be doing something in 7.1 cvs! -- ---- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- -- http://www.comptechnews.com/~reaster/

Re: Sv: [SQL] how to build this query ??? Please help !!!

2001-01-08 Thread Robert B. Easter
remove "AS b". On Monday 08 January 2001 17:24, Robert B. Easter wrote: > I was playing around with subselects and managed to crash the backend (if > you try, it can be done I guess): > > create table x (a numeric); > create table y (b numeric); > > insert int

Re: Sv: [SQL] how to build this query ??? Please help !!!

2001-01-08 Thread Robert B. Easter
n "count(*)") and > AFAIK in no other relational database. I really cannot imagine any > equivalent join-statement (or anything else like a subquery) which > brings the same results! Does this at all correlate with the philosophy > of a relational database? > > Best r

Re: [SQL] substring ..

2000-12-19 Thread Robert B. Easter
| [EMAIL PROTECTED] > www.pgsql.com | www.hub.org > 1-902-542-0713| 1-902-542-3657 > - > Facsimile : 1 902 542 5386 > IRC Nick : bignose > PGP Public Key : http://bignose.hub.org/public.txt --

Re: [SQL] Documentation for CASE

2000-12-16 Thread Robert B. Easter
r SQL language elements etc can be used in assignments too. On Saturday 16 December 2000 12:39, Peter Eisentraut wrote: > Albert REINER writes: > > I think that the documentation for CASE is not very clear: > > Maybe you will like this better (from upcoming 7.1): > > http

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

2000-12-13 Thread Robert B. Easter
ay query is entirely once table linking to itself on > (hopefully) indexed fields, in my expreience it runs very, very fast. > 4. My PHP developer has reprogrammed the easily available PHP Tree > Control to uses this table structure (I don't know if he's giving it > out, but he said it wasn't very difficult). > > -Josh Berkus -- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/

Re: [SQL] Null comparison

2000-12-13 Thread Robert B. Easter
have a regsub that handles <> and > > NULLs, since <> doesn't work on a NULL field. -- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/

Re: [SQL] Where Can I find JDBC driver.

2000-12-11 Thread Robert B. Easter
with the source. -- ---- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/

Re: [SQL] Help with Procedures in pgsql

2000-11-30 Thread Robert B. Easter
Isn't that the right sintax to declare variables in pgsql? What's wrong > with it? > Does my procedure contain any other errors that will appear later? > > > > Thanks -- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/

Re: [SQL] how many rows? [was Re: fetching rows]

2000-11-17 Thread Robert B. Easter
On Friday 17 November 2000 04:01, Arnaud Vandyck wrote: > "Robert B. Easter" wrote: > > > you can't do that with a cursor, but you can use they mysql-ism called > > > a limit clause. for example, to fetch rows 26-50 from that query, > > > you'

Re: [SQL] fetching rows

2000-11-16 Thread Robert B. Easter
you'd > do: > > select * from films limit 25,26; > > or > > select * from files limit 25 offset 26; -- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/

Re: [SQL] Conditional rule?

2000-07-29 Thread Robert B. Easter
On Sat, 29 Jul 2000, André Næss wrote: > This seems ok to me, but I still don't like the invisibility as I pointed > out above. If someone else was to continue my work how would they be able to > see the triggers and procedures? They don't show up on "\d tablename", so it SELECT prosrc FROM pg_pr

Re: [SQL] Conditional rule?

2000-07-28 Thread Robert B. Easter
On Fri, 28 Jul 2000, André Næss wrote: > Thanks for all the help so far. What I now have is the following structure: > > create table b_news ( > id serial primary key, > title varchar(60), > time timestamp > ); > > create table b_news_unpublished ( > news_id int references news on delete

Re: [SQL] Conditional rule?

2000-07-27 Thread Robert B. Easter
On Thu, 27 Jul 2000, Robert B. Easter wrote: > On Thu, 27 Jul 2000, André Næss wrote: > > I've been looking through the material I have on postgreSQL, but can't seem > > to find an answer to my problem. Very simplied, my tables are something like > > this: > &g

Re: [SQL] Conditional rule?

2000-07-27 Thread Robert B. Easter
On Thu, 27 Jul 2000, André Næss wrote: > I've been looking through the material I have on postgreSQL, but can't seem > to find an answer to my problem. Very simplied, my tables are something like > this: > > create table news ( >id serial, >story text, >publishtime timestamp > ) > >

[SQL] How to get count of rows in cursor

2000-07-16 Thread Robert B. Easter
Is there some fast way to get the count of rows in a cursor? FETCH count(*) FROM mycursor; -- expresses what I want I know I could always just do a SELECT count(*) in a separate query, but I'm asking in case a cursor has this information already and I just don't know how to get it. --

[SQL] ALTER TABLE ADD COLUMN syntax question.

2000-07-05 Thread Robert B. Easter
I used the command below to alter a table and it took with no problem, but the REFERENCES appears to have been ignored since I can put invalid numbers into last_post_id. Are there plans to add the ability to specify column constrainsts with ALTER TABLE ADD COLUMN in the future? For now, I suppo

Re: [SQL] retrieving a serial number

2000-06-28 Thread Robert B. Easter
numbers? > > Michael Lea > Information Security > Manitoba Public Insurance > Phone: (204) 985-8224 -- Robert B. Easter

Re: [SQL] HI! Problems with cursors into triggers

2000-06-28 Thread Robert B. Easter
ION miFunc () RETURNS OPAQUE AS ' >DECLARE > Cuenta_t INT4; >BEGIN > begin work; Can't have nested transactions. Can't use BEGIN/COMMIT within a trigger. -- Robert B. Easter

Re: [SQL] Outer join in postgresql

2000-06-12 Thread Robert B. Easter
FROM master m, slave s WHERE m.m_id = s.m_id (+); m_id | m_name | m_id | s_name --++--+--- 1 | Satan |1 | Joe 1 | Satan |1 | Tom 2 | God| | (3 rows) I keep a file at http://comptechnews.com/~reaster/dbdesign.html that has some info that might be useful to some people. -- Robert B. Easter