sharika_ganju
New Member
Hi,
I had a query. Request someone to please help me for the same. I am trying to query a table based on values defined in another table.
The scenerio is something like this -
I have a table xyz where there are 3 fields -
1) fieldname
2) fieldvalue
3) field description
eg lets suppose the records could be like
1) ad_state 2) US 3) United States of America
I have another table yyy which has to be queried according to the values defined in the first table xyz
So something like
find first yyy where yyy.ad_state = xyx.ad_state and
yyy.<ad_state field value> = Any of the fieldvalues defined in the xyz table or
yyy.<ad_state field value> = Any of the field description defined in xyz table no-lock no-error.
if available yyy then do:
........
end.
How can I perform such an operation. I tried using dynamic queries but as I am not that comfortable with dynamic queries I could not perform this query.
Can someone pls help.
Thanks in Advance.
Sharika.
I had a query. Request someone to please help me for the same. I am trying to query a table based on values defined in another table.
The scenerio is something like this -
I have a table xyz where there are 3 fields -
1) fieldname
2) fieldvalue
3) field description
eg lets suppose the records could be like
1) ad_state 2) US 3) United States of America
I have another table yyy which has to be queried according to the values defined in the first table xyz
So something like
find first yyy where yyy.ad_state = xyx.ad_state and
yyy.<ad_state field value> = Any of the fieldvalues defined in the xyz table or
yyy.<ad_state field value> = Any of the field description defined in xyz table no-lock no-error.
if available yyy then do:
........
end.
How can I perform such an operation. I tried using dynamic queries but as I am not that comfortable with dynamic queries I could not perform this query.
Can someone pls help.
Thanks in Advance.
Sharika.