Extract from text id other table - PG 9.1

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Extract from text id other table - PG 9.1
Date: 2017-06-07 02:32:16
Message-ID: CAJNY3iu27HeC+djtmvidYyTwUpnF46dz7iDKWzdooPbKyJYbbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys,

I've got tableA with 3 columns.

id(seriaL) | type(character varying(256)) | string(character varying(256))

I have the type/string value stored in another table, and from that i would
like to get the id.

Example:
http://dbfiddle.uk/?rdbms=postgres_9.6&fiddle=15c571caa36876f00a0a2eaace703a2b

How can I extract, from that tablea.type_m column the tableb.id value?

Thanks
Patrick

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2017-06-07 03:50:32 Re: Extract from text id other table - PG 9.1
Previous Message Adrian Klaver 2017-06-07 00:08:43 Re: Redo the filenode link in tablespace