Re: [SQL] displaying correct name

2003-03-13 Thread Tomasz Myrta
Bruce Young wrote: what i want to do is select from "requests" where ownerid=. the result should contain the users.username of requests.buyerid and the item.title of requests.itemid. my problem is... i am getting the username of requests.ownerid instead from my query. here is my query: select u.us

Re: [SQL] What's wrong with this group by clause?

2003-03-13 Thread Len Morgan
From: Franco Bruno Borghesi <[EMAIL PROTECTED]> >SELECT > 0 AS field1, > 0 AS field2, >name >FROM > people >GROUP BY > field1, > field2, >name; I think the problem is that you don't have a column to group on. Try adding SELECT ,count(*) so that there is an aggregate of some

Re: [SQL] nearest match

2003-03-13 Thread Larry Rosenman
--On Thursday, March 13, 2003 11:22:21 -0600 Ryan Orth <[EMAIL PROTECTED]> wrote: Ryan wrote: Hot damn! thats exactly what I needed. I imagine I would only be comparing the distance of 50 points at any given time (about the max number of reference numbers on any given image) so its mighty qui

Re: [SQL] Create function statement with insert statement

2003-03-13 Thread Ian Harding
I think the language needs to be in quotes ... ... ' language 'sql'; >>> "Jon Griffin" <[EMAIL PROTECTED]> 03/12/03 11:59AM >>> You need to put your aliases in: value1 alias for $1; etc. Hello, > > I am trying to create a database trigger which inserts into a second > table. I have created the

Re: [SQL] nearest match

2003-03-13 Thread Ryan Orth
> Ryan wrote: >> I'm doing some work with part diagrams and server-side image maps. I >> want to store single point coordinates (x,y) for reference numbers in >> a table looking like: >> >> reference_number text, >> x int, >> y int >> >> My question is: How can I find the *nearest* match of some c

[SQL] Poor performance on a right join

2003-03-13 Thread Carmen
When doing a join query I am getting a responce time of 3 seconds. The callhist table has 66000 rows and the phone table has 1 rows. I have an indexes on callhist.call_date, callhist.operator_id, phone.phone, & phone.cust_code. Here's the SQL SELECT a.CALL_DATE, a.OPERATOR_ID, a.CUST_CODE FROM

Re: [SQL] View - Join based on dis-similar data types

2003-03-13 Thread speakeasy
Not sure if this ever made it to the group, I can't seem to find it in the recent message lists. "speakeasy" <[EMAIL PROTECTED]> wrote in message news:... > I have a field defined as a character(50) data type, and the same field > stored in a transition table as a text type. > > The view itself wo

[SQL]

2003-03-13 Thread Tilo Schwarz
unsubscribe end ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [HACKERS] [SQL] What's wrong with this group by clause?

2003-03-13 Thread Tom Lane
Manfred Koizar <[EMAIL PROTECTED]> writes: > ISTM you have found a Postgres 7.3 bug. Yeah. Actually, the planner bug has been there a long time, but it was only latent until the parser stopped suppressing duplicate GROUP BY items: 2002-08-18 14:46 tgl * src/backend/parser/parse_clause.

Re: [HACKERS] [SQL] What's wrong with this group by clause?

2003-03-13 Thread Christoph Haller
> > On Tue, 4 Nov 2003 18:28:12 -0300, Franco Bruno Borghesi > <[EMAIL PROTECTED]> wrote: > >Below you can find a simplified example of a real case. > >I don't understand why I'm getting the "john" record twice. > > ISTM you have found a Postgres 7.3 bug. > > I get one john with > PostgreSQL 7.1.3

Re: [SQL] What's wrong with this group by clause?

2003-03-13 Thread Manfred Koizar
[forwarding to -hackers] On Tue, 4 Nov 2003 18:28:12 -0300, Franco Bruno Borghesi <[EMAIL PROTECTED]> wrote: >Below you can find a simplified example of a real case. >I don't understand why I'm getting the "john" record twice. ISTM you have found a Postgres 7.3 bug. I get one john with Postgr

Re: [SQL] Create function statement with insert statement

2003-03-13 Thread Christoph Haller
Hello Susan, > > The relevant code for creating the hexorders table (and associated > constraints) is: > > > DROP TABLE HEXORDERS ; > > DROP SEQUENCE HEXORDERS_SEQ ; > > CREATE SEQUENCE HEXORDERS_SEQ START 1 ; > > CREATE TABL