From: | Art Fore <art(dot)fore(at)comcast(dot)net> |
---|---|
To: | Pgadmin-Support <pgadmin-support(at)postgresql(dot)org> |
Subject: | Query (view) question |
Date: | 2007-02-12 10:40:08 |
Message-ID: | 1171276808.24443.12.camel@linux-latitude.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
I have been trying to get a query going in a postgres database, a simple
on at that, and have had no success expcept using Access.
Here is the query that works in Access.
SELECT remote_ALL_PARTS.PARTNUM, public_datasheet_address.Datasheet &
remote_ALL_PARTS.Datasheet AS Expr1, public_datasheet_address.Datasheet
& remote_ALL_PARTS.Outline AS Expr2, public_datasheet_address.Footprint
& remote_ALL_PARTS.Footprint AS Expr3
FROM remote_ALL_PARTS, public_datasheet_address
WHERE (((remote_ALL_PARTS.PARTNUM) Like "091-" & "*"));
I tried this as a view with pgadmin with slight mods, This one below
works
SELECT "ALL_PARTS"."PARTNUM", "ALL_PARTS"."Datasheet",
"ALL_PARTS"."Outline", "ALL_PARTS"."Footprint"
FROM "ALL_PARTS" "ALL_PARTS"
WHERE "ALL_PARTS"."PARTNUM"::text ~~ '021-%'::text;
But, if I do the following
SELECT "ALL_PARTS"."PARTNUM", "datasheet_address","sheet" ||
"ALL_PARTS"."Datasheet", "ALL_PARTS"."Outline", "ALL_PARTS"."Footprint"
FROM "ALL_PARTS" "ALL_PARTS", "datasheet_address"
"datasheet_address"
WHERE "ALL_PARTS"."PARTNUM"::text ~~ '021-%'::text;
I get an error that it cannot modify "Datasheet"
If I change to
SELECT "ALL_PARTS"."PARTNUM", "datasheet_address","sheet" ||
"ALL_PARTS"."Datasheet" AS "Exp1", "ALL_PARTS"."Outline",
"ALL_PARTS"."Footprint"
FROM "ALL_PARTS" "ALL_PARTS", "datasheet_address"
"datasheet_address"
WHERE "ALL_PARTS"."PARTNUM"::text ~~ '021-%'::text;
I still get a similar error.
Have searched for concatenating to fields, but had no success. Can
anyone help? I hope so, otherwise, will have to go to a Access database
and I do not want to do that.
Art
From | Date | Subject | |
---|---|---|---|
Next Message | Joris Dobbelsteen | 2007-02-12 11:00:35 | Re: Query (view) question |
Previous Message | Richard Huxton | 2007-02-12 08:19:15 | Re: [SQL] Password Policy |