Re: if in select statement
Arne Gehlhaar <[email protected]> Thu, 28 Aug 2003 12:26:29 +0200
| Newsgroups | gmane.comp.db.sapdb.general |
|---|---|
| Organization | ISL Bremen |
| Message-ID | <[email protected]> |
I believe OUTER JOIN is what you are looking for... Arne Jens Stier wrote: > hi, > > > i have two tables tbllieferant and tblbranche. > > in tbllieferant i have 3 fields branche1,branche2,branche3. in these fields > i save an id from tblbranche. if i want to join these tables i have a > problem if one of the brancheX-fields is null: > > here my select: > > select > tbllieferant.id, > tbllieferant.name, > tbllieferant.ort, > branche1.bezeichnung&', '&branche2.bezeichnung&', '&branche3.bezeichnung as > branchen > > from tbllieferant join > tbladresse on tbllieferant.adresse=tbladresse.id > left join tblbranche branche1 on tbllieferant.branche1=branche1.id > left join tblbranche branche2 on tbllieferant.branche2=branche2.id > left join tblbranche branche3 on tbllieferant.branche3=branche3.id > > > > > > is there any way to solve this problem? > > > greetz > > Jens > > _______________________________________________ > sapdb.general mailing list > [email protected] > http://listserv.sap.com/mailman/listinfo/sapdb.general > -- Institute of Shipping Economics and Logistics http://www.isl.org/ Arne Gehlhaar mailto:[email protected] Universitaetsallee GW1 Block A phone:+49.421.22096.49 D-28359 Bremen, Germany fax:+49.421.22096.55