Re: sql hard question - Mailing list pgsql-sql

From Josh Berkus
Subject Re: sql hard question
Date
Msg-id web-67654@davinci.ethosmedia.com
Whole thread Raw
In response to sql hard question  (limorr@scepia.com (limlim))
List pgsql-sql
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
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: Jie Liang
Date:
Subject: Re: plperl
Next
From: Judd Maltin
Date:
Subject: "Day" from 8am to 3am