September 3, 2007 at 6:08 am
Hello,
i have a problem with my select query,
i don't obtain the right information
I have three views:
---------------------------------------------------------------------------
v_configurationitem
Brand data : ("HEWLETT PACKARD")
v_brand
object_id data : ("1,00854654")
Text data: ("HEWLETT PACKARD")
v_valuemapping
External_value data: ("H.P.")
Internal_value data : ("1,00854654")
---------------------------------------------------------------------------------------
Now i want to obtain the data from External_value from the view v_valuemapping, so i want the value "H.P.", the starting point will be v_configurationitem
As you can see i can only obtain this in 2 steps
---------------------------------------------------------------------------------------
I have tried this but what i obtain is a list of all items from the valuemapping,
here is the query i have tried:
SELECT
External_value
FROM
v_valuemapping
WHERE
EXISTS (SELECT v_valuemapping.EXTERNAL_VALUE
FROM
v_valuemapping, v_brand, v_configurationitem
WHERE
v_valuemapping.internalvalue = v_brand.OBJECT_ID and v_configurationitem.brand= 'H.P.')
---------------------------------------------------------------------------
Can anyone please help
many thanks and greetings
Steve
September 3, 2007 at 6:17 am
select vvm.External_Value
from v_valueconfigurationItem vvc
join v_valuebrand vvb on vvc.Brand = vvb.Text
join v_valuemapping vvm on vvb.ObjectId = vvm.InternalValue
Where vvc.Brand = 'Hewlett Packard'
ought to work
S
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply