Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f55NWME65230 for ; Tue, 5 Jun 2001 19:32:22 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 67654; Tue, 05 Jun 2001 16:32:19 -0700 From: "Josh Berkus" Subject: Re: sql hard question To: limorr@scepia.com, pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Tue, 05 Jun 2001 16:32:19 -0700 Message-ID: In-Reply-To: <875516e7.0105300341.1ae6545b@posting.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200106/52 X-Sequence-Number: 3264 Limlim, Please post table definitions and some sample data. Your problem does not look that challenging and there is probably a simple reason that you're having trouble with it. > i am trying to build a query in sql that compares between 2 tables > one > hold to field and the other hold the 2 fields in one > example: > table1:EN,12 > table2:EN.12 > how can i compare between the tables throw that field > i try with this query but it doesnt work: > > SELECT * FROM dbo.CNT_DOC_LANGS x INNER JOIN dbo.CNT_DOCS2QUEST y ON > (CAST(x.DOC_ID AS varchar) + '.' + RTRIM(x.LANG)) t = y.SRC_ID ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco