pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
sql hard question
2+ messages / 2 participants
[nested] [flat]

* sql hard question
@ 2001-05-30 11:41 limlim <limorr@scepia.com>
  2001-06-05 23:32 ` Re: sql hard question Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 2+ messages in thread

From: limorr@scepia.com @ 2001-05-30 11:41 UTC (permalink / raw)
  To: pgsql-sql

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

please help



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: sql hard question
  2001-05-30 11:41 sql hard question limlim <limorr@scepia.com>
@ 2001-06-05 23:32 ` Josh Berkus <josh@agliodbs.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Josh Berkus @ 2001-06-05 23:32 UTC (permalink / raw)
  To: limorr@scepia.com; 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 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-06-05 23:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-30 11:41 sql hard question limlim <limorr@scepia.com>
2001-06-05 23:32 ` Josh Berkus <josh@agliodbs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox