Re: [SQL] Maybe a Bug, maybe bad SQL

2001-03-21 Thread D'Arcy J.M. Cain
Thus spake Grant > Why does everyone reply to the person as well as CC to the list when the > person is on the list anyhow? Politeness. You reply to the list so that others benefit from the discussion and you copy the sender since some people don't get to their mailing lists as quickly as their

[SQL] Complex Query Help

2001-03-21 Thread Brian C. Doyle
Hello all, I have a table of work shifts. It has Table "teams" Attribute | Type | Modifier +---+-- team_id| varchar(50) | team_name | varchar(100) | location | varchar(100) | department | varchar(100) | shift |

Re: [SQL] Maybe a Bug, maybe bad SQL

2001-03-21 Thread Bruce Momjian
> version 7.0.3 > > binary_data=# select day, date_part('day', day) AS day from test; > day | day > +- > 02/04/2000 | 2 > 01/04/2000 | 1 > 03/04/2000 | 3 > (3 rows) > > binary_data=# > > Why does everyone reply to the person as well as CC to the list when the >

Re: [SQL] how do I find which ...

2001-03-21 Thread Cedar Cox
On Wed, 21 Mar 2001, datactrl wrote: > I write some functions inPL/pgSQL. If I drop a function B , which is called > by function A, and create function B again, then function A won't work If I recall correctly, this is because function A's "compiled" code refers to the oid of the now non-exist

Re: [SQL] Maybe a Bug, maybe bad SQL

2001-03-21 Thread Bruce Momjian
> Note also that it's a mailing list cultural thing: many lists operate > in a 'post only to the list' mode. Those of us on the pgsql lists do the > 'list and person' thing, in response to direct questions, for the reasons > Bruce and D'Arcy point out. Note that by knowing the reasons, one may > t

Re: [SQL] Maybe a Bug, maybe bad SQL

2001-03-21 Thread Ross J. Reedstrom
On Wed, Mar 21, 2001 at 08:20:22AM -0500, Bruce Momjian wrote: > > version 7.0.3 > > > > binary_data=# select day, date_part('day', day) AS day from test; > > day | day > > +- > > 02/04/2000 | 2 > > 01/04/2000 | 1 > > 03/04/2000 | 3 > > (3 rows) > > > > binary_d

Re: [SQL] Maybe a Bug, maybe bad SQL

2001-03-21 Thread Cedar Cox
> > Why does everyone reply to the person as well as CC to the list when the > > person is on the list anyhow? > > Good question. They get the reply faster by sending it to them and the > list, and if someone later wants to reply only to the poster, they have > the email address right there. A

[SQL] rows equal

2001-03-21 Thread Marios Moutzouris
Hello I need a sql query to a postgresql database which can tell me whether the rows returned ar equal. i.e --- Status --- Order --- Collected -- This is two columns. Both are not equal. Any help?...without having to write code to fetch the result and go through etc e

[SQL] Toggle a Bit type ie not field

2001-03-21 Thread Peter Morgan
Here's the SP that toggles a Bit datatype. How would I make it comething like ??? update pcpmanufacturers set def = not (def) where ManufID = @ManufID -- create Procedure pcp_manufToggle @ManufID int as Set nocount on declare

[SQL] LEFT JOIN

2001-03-21 Thread Grant Furick
I am trying to output news. An article can have an image or not sometimes. Can someone help me get this to work in Postgres? select a.article_id, a.title, a.url, a.synopsis, a.publish_date, c.parent_category_id, c.category_id, c.category_name, i.server_image_name from ((article a JOIN articl

[SQL] FULL JOIN

2001-03-21 Thread Ligia Pimentel
Does anyone know if it is possible to make a FULL OUTER JOIN in Postgres 7? Thank you for your help, Ligia ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] Error when selecting rows from a temporary table in ODBC

2001-03-21 Thread Ligia Pimentel
When we execute this query in psql over linux, we don't get any errors select sum(valor) as totalCR, count(correlativo) as docsCR, caja into tmp_cr from transaccion as t, codigocaja as c where c.codigo = t. codigo and c.tipomov = 'CR' group by caja; select sum(valor) as totalDB, count(correlativ

[SQL] Re: Toggle a Bit type ie not field

2001-03-21 Thread Brent Verner
On 20 Mar 2001 at 23:07 (-), Peter Morgan wrote: | Here's the SP that toggles a Bit datatype. How would I make it comething | like | ??? | update pcpmanufacturers set def = not (def) where ManufID = @ManufID update pcpmanufacturers set def=(1-def) where ManufID=@ManufID; hth. brent

Re: [SQL] CHAR or VARCHAR

2001-03-21 Thread Peter J. Schoenster
On 21 Mar 2001, at 18:58, Martin A. Marques wrote: > two questions. > When should I use one, and when the other? > Which is the limit on CHAR(n) and VARCHAR(n)? Okay, here is my more "let's get this thing working" as opposed to "after dedicated study of the matter" opinion (which I hope some d

Re: [SQL] Re: psql win32 version

2001-03-21 Thread datactrl
Hi, Christopher Thank you for your help, but the URL http://www.zeos.dn.ua/download/ipgsql-1.6.2.zip is a broken link. Would you please check again. Thank you very much. Jack - Original Message - From: "Christopher Sawtell" <[EMAIL PROTECTED]> Newsgroups: comp.databases.postgresql.sql S

Re: [SQL] Error when selecting rows from a temporary table in ODBC

2001-03-21 Thread Hiroshi Inoue
Ligia Pimentel wrote: > > When we execute this query in psql over linux, we don't get any errors > > select sum(valor) as totalCR, count(correlativo) as docsCR, caja into tmp_cr > from transaccion as t, codigocaja as c > where c.codigo = t. codigo > and c.tipomov = 'CR' > group by caja; > > sele

Re: [SQL] Maybe a Bug, maybe bad SQL

2001-03-21 Thread Tom Lane
[EMAIL PROTECTED] (D'Arcy J.M. Cain) writes: > Thus spake Grant >> Why does everyone reply to the person as well as CC to the list when the >> person is on the list anyhow? > Politeness. You reply to the list so that others benefit from the discussion > and you copy the sender since some people

Re: [SQL] Error when selecting rows from a temporary table in ODBC

2001-03-21 Thread Tom Lane
Hiroshi Inoue <[EMAIL PROTECTED]> writes: > Ligia Pimentel wrote: >> conn=57295424, query='drop table tmp_cr; drop table tmp_db; select >> sum(valor) as totalCR, count(correlativo) as docsCR, caja into tmp_cr from >> transaccion as t, codigocaja as c where c.codigo = t. codigo and c.tipomov = >> '

Re: [SQL] FULL JOIN

2001-03-21 Thread Tom Lane
"Ligia Pimentel" <[EMAIL PROTECTED]> writes: > Does anyone know if it is possible to make a FULL OUTER JOIN in Postgres 7? In 7.1. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster