Re: select with multiple references

From: Jens Wilken <JWilken_at_scopeland.de>
Date: Sat, 21 Jul 2001 23:26:35 GMT
Message-ID: <3B13AFC1.760C539F_at_scopeland.de>


How about some decent SQL-Book, because this is BASICS!! I definitely encourage anyone to engage in newsgroups, but this is called "database.theory" and the question would be FAQ-Level in if there was any (is there???).
Nothing against questions, but it would really help you to invest some time in reading than to post a question every time a problem occurs, especially when beginning with things.

Regards
Jens

Michael Werber wrote:

> hi there,
>
> i think i hav a pretty simpleproblem but i dont know how to solve this.
> imagine, i have 2 fields in a table, each representing one traffic
> light. for the possible colors a have another table. so here are the
> tables and thre content:
>
> color:
> id color
> -----------
> 1 red
> 2 yellow
> 3 green
>
> trafficlight:
> id idColor1 idColor2 someOtherColumn
> --------------------------------------------
> 1 2 3 sometext
> 2 3 3 sometexttoo
> 3 3 1 somemoretext
> : : : :
>
> this means entry 1 in the trafficlight-table means that one light is
> yellow while the other one is green.
>
> what i want to do is a select wich gives me all records of the
> trafficlight-table but instead of the numbers i want to see the
> colornames. i mean the result of the select-statement should look like:
>
> selectstatement:
> someOtherColumn Light1 Light2
> -----------------------------
> someText yellow green
> someTextToo green green
> someMoreText green red
>
> see what i mean? sorry, i know it was quite a lot text to read but i
> dont know how to write this shorter.
>
> thanks for any help
>
> michael werber

--

Jens Wilken
Developer

+ + + SCOPELAND 2000 + + + The Code-free Database Application Platform + +
+

SCOPELAND Software GmbH
Bergfelder Straße 1
D-16547 Birkenwerder/Berlin
Phone:   +49 (0) 33 03 53 43 - 0
Fax:       +49 (0) 33 03 50 16
E-mail:   JWilken_at_scopeland.de
http://www.scopeland.de
http://www.scopeland.com
http://www.scopeland.com.au
Received on Sun Jul 22 2001 - 01:26:35 CEST

Original text of this message