Re: Creation of VIEWS not working....

From: "paul butler" <paul(at)entropia(dot)co(dot)uk>
To: Thomas Adam <thomas_adam16(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Creation of VIEWS not working....
Date: 2003-02-03 13:47:05
Message-ID: 0f48c4349130323PCOW058M@blueyonder.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Date sent: Mon, 3 Feb 2003 12:59:33 +0000 (GMT)
From: Thomas Adam <thomas_adam16(at)yahoo(dot)com>
Subject: [NOVICE] Creation of VIEWS not working....
To: pgsql-general(at)postgresql(dot)org
Copies to: pgsql-novice(at)postgresql(dot)org
CREATE VIEW SALES AS
SELECT REPID, ORD.CUSTID, CUSTOMER.NAME,
PRODUCT.PRODID, CUSTNAME, PRODUCT.PRODID,
DESCRIP PRODNAME, SUM(ITEMTOT) AMOUNT
FROM ORD, ITEM, CUSTOMER, PRODUCT
WHERE ORD.ORDID = ITEM.ORDID
AND ORD.CUSTID = CUSTOMER.CUSTID
AND ITEM.PRODID = PRODUCT.PRODID; <<-
extra colon here I think

GROUP BY REPID, ORD.CUSTID, NAME, PRODUCT.PRODID,
DESCRIP;

Dear List,

This is my first post to the list, so forgive me if my
etiquette is not correct, or this question has been
answered before.

I'm trying to convert an Oracle SQL script to
postgresql. I have everything working in the script,
except for the last part -- the creation of views. I
get an error near the "CUSTNAME", and I don't know
why. Is the syntax incorrect? I haven't altered this
part yet. Thus it is the original code from the
SQL*PLUS oracle database, which works.

I have attached the file I'm trying to run. The Create
View statement is at the bottom. If anyone can help,
I'd appreciate it :-)

(SEE ATTACHED: emp.sql)

Many Thanks,

-- Thomas Adam

=====
Thomas Adam

"The Linux Weekend Mechanic" -- www.linuxgazette.com

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-02-03 13:51:31 FOSDEM schedule
Previous Message Elielson Fontanezi 2003-02-03 13:12:51 st.executeQuery("SELECT NEXTVAL('seq_suporte') AS valor");

Browse pgsql-novice by date

  From Date Subject
Next Message paul butler 2003-02-03 14:02:41 Re: Creation of VIEWS not working....
Previous Message pginfo 2003-02-03 13:37:42 Re: Sun J2EE server (default with J2EE package) + PostgreSQL