| From: | Shadkam Islam <shadkam(at)wipinfo(dot)soft(dot)net> |
|---|---|
| To: | postgresSQL <pgsql-general(at)postgreSQL(dot)org> |
| Subject: | Confusion in Insert Query syntax |
| Date: | 1999-10-06 04:34:24 |
| Message-ID: | Pine.LNX.3.96.991006095532.24263D-100000@trishul.wipinfo.soft.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi All,
If I type \h insert at psql it shows me,
INSERT INTO class_name [(attr1, ...attrN)]
VALUES (expr1,..exprN) |
SELECT [DISTINCT [ON attrN]]
expr1, ...exprN
[FROM from_clause]
[WHERE qual]
[GROUP BY group_list]
[HAVING having_clause]
[ { UNION [ALL] | INTERSECT | EXCEPT } SELECT ...];
But when I tried the following query it gave the parse error
INSERT INTO EffortTable (EffortID)
VALUES (ValueForEffortID) |
SELECT MAX(EffortID) AS ValueForEffortID
FROM EffortTable
WHERE ProjectID=200;
the error is --> ERROR: parser: parse error at or near "|"
What is the syntax I should use.
Thanx in advance,
Shad.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 1999-10-06 04:52:26 | Re: [GENERAL] Confusion in Insert Query syntax |
| Previous Message | Omega Weapon | 1999-10-06 02:51:44 | copying from one table to another |