on 06-03-2011 7:37 PM
Hola compañeros:
Alguien me puede ayudar en decirme como puedo hacer un INNER JOIN con las tablas OITM y OITG, lo he tratado con el case que el campo ItmsTypCod sea = al QryGroup1 y asi sucesivamente pero no jala, alguien sabe de algun campo en la OITM que se ligue directamente con la OITG.
Espero sus respuestas de ayuda de antemano un agradecimiento.
Saludos cordiales buen día,
Erik
Intenta esto con cada propiedad agregas un when
select itemcode, 'Propiedad' = case when qrygroup1='Y' then (select itmsgrpnam from OITG where ItmsTypCod =1)
when qrygroup2='Y' then (select itmsgrpnam from OITG where ItmsTypCod =2)
when qrygroupX='Y' then (select itmsgrpnam from OITG where ItmsTypCod =X)
.
.
.
.
.
end
from OITM
a ver si te sirve
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No lo hay, y no puedes hacer un join con la tabla oitg y su campo ItmsTypCod porque este si tiene valores numericos, y el campo qrygroup de la oitm solo te marca 'Y' o 'N'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.